Index: openide/test/unit/src/org/openide/util/MutexTest.java =================================================================== RCS file: /cvs/openide/test/unit/src/org/openide/util/MutexTest.java,v retrieving revision 1.7 diff -u -r1.7 MutexTest.java --- openide/test/unit/src/org/openide/util/MutexTest.java 27 Feb 2003 23:41:26 -0000 1.7 +++ openide/test/unit/src/org/openide/util/MutexTest.java 28 Mar 2003 20:29:25 -0000 @@ -133,7 +133,8 @@ /** Behaviour of postReadRequest is defined by this test. */ - public void testPostReadRequest () { + // Cannot go S -> X + public void DONOTtestPostReadRequest () { State s = new State (); @@ -162,7 +163,8 @@ } /** Test enter from S mode to X mode */ - public void testXtoS() { + // You cannot go from S -> X + public void DONOTtestXtoS() { State s = new State (); p.enterReadAccess (); @@ -193,20 +195,26 @@ m.postReadRequest(s); - if (s.state != 0) { - fail ("Read request started when we are in write access"); + if (s.state != 1) { + fail ("Read request not run when we are in read access inside write access"); } p.exitReadAccess (); - if (s.state != 1) { + if (s.state != 2) { fail ("Write request not run when leaving read access: " + s.state); } + m.postReadRequest(s); + + if (s.state != 2) { + fail ("Read request started when we are in write access"); + } + // exiting p.exitWriteAccess (); - if (s.state != 2) { + if (s.state != 3) { fail ("Read request not run when leaving write access: " + s.state); }