This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 32439
Collapse All | Expand All

(-)openide/test/unit/src/org/openide/util/MutexTest.java (-6 / +14 lines)
Lines 133-139 Link Here
133
    
133
    
134
    /** Behaviour of postReadRequest is defined by this test.
134
    /** Behaviour of postReadRequest is defined by this test.
135
     */
135
     */
136
    public void testPostReadRequest () {
136
    // Cannot go S -> X
137
    public void DONOTtestPostReadRequest () {
137
        
138
        
138
        State s = new State ();
139
        State s = new State ();
139
        
140
        
Lines 162-168 Link Here
162
    }
163
    }
163
    
164
    
164
    /** Test enter from S mode to X mode */
165
    /** Test enter from S mode to X mode */
165
    public void testXtoS() {
166
    // You cannot go from S -> X
167
    public void DONOTtestXtoS() {
166
        State s = new State ();
168
        State s = new State ();
167
        
169
        
168
        p.enterReadAccess ();
170
        p.enterReadAccess ();
Lines 193-212 Link Here
193
                
195
                
194
            m.postReadRequest(s);
196
            m.postReadRequest(s);
195
            
197
            
196
            if (s.state != 0) {
198
            if (s.state != 1) {
197
                fail ("Read request started when we are in write access");
199
                fail ("Read request not run when we are in read access inside write access");
198
            }
200
            }
199
            
201
            
200
            p.exitReadAccess ();
202
            p.exitReadAccess ();
201
            
203
            
202
            if (s.state != 1) {
204
            if (s.state != 2) {
203
                fail ("Write request not run when leaving read access: " + s.state);
205
                fail ("Write request not run when leaving read access: " + s.state);
204
            }
206
            }
205
            
207
            
208
            m.postReadRequest(s);
209
            
210
            if (s.state != 2) {
211
                fail ("Read request started when we are in write access");
212
            }
213
            
206
        // exiting
214
        // exiting
207
        p.exitWriteAccess ();
215
        p.exitWriteAccess ();
208
        
216
        
209
        if (s.state != 2) {
217
        if (s.state != 3) {
210
            fail ("Read request not run when leaving write access: " + s.state);
218
            fail ("Read request not run when leaving write access: " + s.state);
211
        }
219
        }
212
        
220
        

Return to bug 32439