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

Comparing jsr166/src/test/tck/LinkedBlockingQueueTest.java (file contents):
Revision 1.72 by jsr166, Sun May 14 00:56:43 2017 UTC vs.
Revision 1.73 by jsr166, Sun May 14 01:30:34 2017 UTC

# Line 449 | Line 449 | public class LinkedBlockingQueueTest ext
449          Thread t = newStartedThread(new CheckedRunnable() {
450              public void realRun() throws InterruptedException {
451                  long startTime = System.nanoTime();
452 <                for (int i = 0; i < SIZE; ++i) {
452 >                for (int i = 0; i < SIZE; i++)
453                      assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS));
454 <                }
454 >
455 >                Thread.currentThread().interrupt();
456 >                try {
457 >                    q.poll(LONG_DELAY_MS, MILLISECONDS);
458 >                    shouldThrow();
459 >                } catch (InterruptedException success) {}
460 >                assertFalse(Thread.interrupted());
461  
462                  pleaseInterrupt.countDown();
463                  try {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines