--- jsr166/src/test/tck/LinkedBlockingDequeTest.java 2017/05/14 00:56:43 1.77 +++ jsr166/src/test/tck/LinkedBlockingDequeTest.java 2017/05/14 01:30:34 1.78 @@ -761,9 +761,15 @@ public class LinkedBlockingDequeTest ext Thread t = newStartedThread(new CheckedRunnable() { public void realRun() throws InterruptedException { long startTime = System.nanoTime(); - for (int i = 0; i < SIZE; ++i) { + for (int i = 0; i < SIZE; i++) assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); - } + + Thread.currentThread().interrupt(); + try { + q.poll(LONG_DELAY_MS, MILLISECONDS); + shouldThrow(); + } catch (InterruptedException success) {} + assertFalse(Thread.interrupted()); pleaseInterrupt.countDown(); try { @@ -1063,9 +1069,8 @@ public class LinkedBlockingDequeTest ext Thread t = newStartedThread(new CheckedRunnable() { public void realRun() throws InterruptedException { long startTime = System.nanoTime(); - for (int i = 0; i < SIZE; ++i) { + for (int i = 0; i < SIZE; i++) assertEquals(i, q.pollFirst(LONG_DELAY_MS, MILLISECONDS)); - } Thread.currentThread().interrupt(); try { @@ -1331,10 +1336,9 @@ public class LinkedBlockingDequeTest ext Thread t = newStartedThread(new CheckedRunnable() { public void realRun() throws InterruptedException { long startTime = System.nanoTime(); - for (int i = 0; i < SIZE; ++i) { + for (int i = 0; i < SIZE; i++) assertEquals(SIZE - i - 1, q.pollLast(LONG_DELAY_MS, MILLISECONDS)); - } Thread.currentThread().interrupt(); try {