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

Comparing jsr166/src/test/tck/PriorityBlockingQueueTest.java (file contents):
Revision 1.71 by jsr166, Sat Mar 11 18:20:47 2017 UTC vs.
Revision 1.74 by jsr166, Sat May 13 22:49:01 2017 UTC

# Line 333 | Line 333 | public class PriorityBlockingQueueTest e
333          final CountDownLatch pleaseInterrupt = new CountDownLatch(1);
334          Thread t = newStartedThread(new CheckedRunnable() {
335              public void realRun() throws InterruptedException {
336 <                for (int i = 0; i < SIZE; ++i) {
337 <                    assertEquals(i, q.take());
338 <                }
336 >                for (int i = 0; i < SIZE; i++) assertEquals(i, q.take());
337  
338                  Thread.currentThread().interrupt();
339                  try {
# Line 353 | Line 351 | public class PriorityBlockingQueueTest e
351              }});
352  
353          await(pleaseInterrupt);
354 <        assertThreadStaysAlive(t);
354 >        assertThreadBlocks(t, Thread.State.WAITING);
355          t.interrupt();
356          awaitTermination(t);
357      }
# Line 418 | Line 416 | public class PriorityBlockingQueueTest e
416                  }
417              }});
418  
419 <        aboutToWait.await();
420 <        waitForThreadToEnterWaitState(t);
419 >        await(aboutToWait);
420 >        assertThreadBlocks(t, Thread.State.TIMED_WAITING);
421          t.interrupt();
422          awaitTermination(t);
423      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines