--- jsr166/src/test/tck/LinkedTransferQueueTest.java 2019/08/11 22:29:27 1.82 +++ jsr166/src/test/tck/LinkedTransferQueueTest.java 2019/09/06 22:43:50 1.84 @@ -281,7 +281,6 @@ public class LinkedTransferQueueTest ext final CountDownLatch pleaseInterrupt = new CountDownLatch(1); Thread t = newStartedThread(new CheckedRunnable() { public void realRun() throws InterruptedException { - long startTime = System.nanoTime(); for (int i = 0; i < SIZE; i++) assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); @@ -294,12 +293,10 @@ public class LinkedTransferQueueTest ext pleaseInterrupt.countDown(); try { - q.poll(LONG_DELAY_MS, MILLISECONDS); + q.poll(LONGER_DELAY_MS, MILLISECONDS); shouldThrow(); } catch (InterruptedException success) {} assertFalse(Thread.interrupted()); - - assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); }}); await(pleaseInterrupt); @@ -317,7 +314,6 @@ public class LinkedTransferQueueTest ext final BlockingQueue q = populatedQueue(SIZE); Thread t = newStartedThread(new CheckedRunnable() { public void realRun() throws InterruptedException { - long startTime = System.nanoTime(); Thread.currentThread().interrupt(); for (int i = 0; i < SIZE; ++i) assertEquals(i, (int) q.poll(randomTimeout(), randomTimeUnit())); @@ -326,7 +322,6 @@ public class LinkedTransferQueueTest ext shouldThrow(); } catch (InterruptedException success) {} assertFalse(Thread.interrupted()); - assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); }}); awaitTermination(t);