--- jsr166/src/test/tck/PriorityBlockingQueueTest.java 2017/05/14 00:48:20 1.75 +++ jsr166/src/test/tck/PriorityBlockingQueueTest.java 2017/05/14 01:30:34 1.76 @@ -404,9 +404,15 @@ public class PriorityBlockingQueueTest e 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 {