ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/AbstractQueuedLongSynchronizerTest.java
(Generate patch)

Comparing jsr166/src/test/tck/AbstractQueuedLongSynchronizerTest.java (file contents):
Revision 1.37 by jsr166, Sun Jan 1 20:34:39 2017 UTC vs.
Revision 1.38 by jsr166, Sun May 14 02:16:56 2017 UTC

# Line 965 | Line 965 | public class AbstractQueuedLongSynchroni
965       */
966      public void testAwaitUninterruptibly() {
967          final Mutex sync = new Mutex();
968 <        final ConditionObject c = sync.newCondition();
968 >        final ConditionObject condition = sync.newCondition();
969          final BooleanLatch pleaseInterrupt = new BooleanLatch();
970          Thread t = newStartedThread(new CheckedRunnable() {
971              public void realRun() {
972                  sync.acquire();
973                  assertTrue(pleaseInterrupt.releaseShared(0));
974 <                c.awaitUninterruptibly();
974 >                condition.awaitUninterruptibly();
975                  assertTrue(Thread.interrupted());
976 <                assertHasWaitersLocked(sync, c, NO_THREADS);
976 >                assertHasWaitersLocked(sync, condition, NO_THREADS);
977                  sync.release();
978              }});
979  
980          pleaseInterrupt.acquireShared(0);
981          sync.acquire();
982 <        assertHasWaitersLocked(sync, c, t);
982 >        assertHasWaitersLocked(sync, condition, t);
983          sync.release();
984          t.interrupt();
985 <        assertHasWaitersUnlocked(sync, c, t);
986 <        assertThreadStaysAlive(t);
985 >        assertHasWaitersUnlocked(sync, condition, t);
986 >        assertThreadBlocks(t, Thread.State.WAITING);
987          sync.acquire();
988 <        assertHasWaitersLocked(sync, c, t);
988 >        assertHasWaitersLocked(sync, condition, t);
989          assertHasExclusiveQueuedThreads(sync, NO_THREADS);
990 <        c.signal();
991 <        assertHasWaitersLocked(sync, c, NO_THREADS);
990 >        condition.signal();
991 >        assertHasWaitersLocked(sync, condition, NO_THREADS);
992          assertHasExclusiveQueuedThreads(sync, t);
993          sync.release();
994          awaitTermination(t);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines