--- jsr166/src/test/tck/LinkedBlockingDequeTest.java 2019/08/11 22:29:27 1.84 +++ jsr166/src/test/tck/LinkedBlockingDequeTest.java 2019/09/05 21:39:57 1.87 @@ -676,12 +676,10 @@ public class LinkedBlockingDequeTest ext pleaseInterrupt.countDown(); try { - q.offer(new Object(), LONG_DELAY_MS, MILLISECONDS); + q.offer(new Object(), LONGER_DELAY_MS, MILLISECONDS); shouldThrow(); } catch (InterruptedException success) {} assertFalse(Thread.interrupted()); - - assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); }}); await(pleaseInterrupt); @@ -778,7 +776,6 @@ public class LinkedBlockingDequeTest 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)); @@ -791,12 +788,10 @@ public class LinkedBlockingDequeTest 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); @@ -924,12 +919,10 @@ public class LinkedBlockingDequeTest ext pleaseInterrupt.countDown(); try { - q.offerFirst(new Object(), LONG_DELAY_MS, MILLISECONDS); + q.offerFirst(new Object(), LONGER_DELAY_MS, MILLISECONDS); shouldThrow(); } catch (InterruptedException success) {} assertFalse(Thread.interrupted()); - - assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); }}); await(pleaseInterrupt); @@ -1097,7 +1090,6 @@ public class LinkedBlockingDequeTest 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, q.pollFirst(LONG_DELAY_MS, MILLISECONDS)); @@ -1110,12 +1102,10 @@ public class LinkedBlockingDequeTest ext pleaseInterrupt.countDown(); try { - q.pollFirst(LONG_DELAY_MS, MILLISECONDS); + q.pollFirst(LONGER_DELAY_MS, MILLISECONDS); shouldThrow(); } catch (InterruptedException success) {} assertFalse(Thread.interrupted()); - - assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); }}); await(pleaseInterrupt); @@ -1291,11 +1281,9 @@ public class LinkedBlockingDequeTest ext pleaseInterrupt.countDown(); try { - q.offerLast(new Object(), LONG_DELAY_MS, MILLISECONDS); + q.offerLast(new Object(), LONGER_DELAY_MS, MILLISECONDS); shouldThrow(); } catch (InterruptedException success) {} - - assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); }}); await(pleaseInterrupt); @@ -1382,7 +1370,6 @@ public class LinkedBlockingDequeTest 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(SIZE - i - 1, q.pollLast(LONG_DELAY_MS, MILLISECONDS)); @@ -1396,12 +1383,10 @@ public class LinkedBlockingDequeTest ext pleaseInterrupt.countDown(); try { - q.pollLast(LONG_DELAY_MS, MILLISECONDS); + q.pollLast(LONGER_DELAY_MS, MILLISECONDS); shouldThrow(); } catch (InterruptedException success) {} assertFalse(Thread.interrupted()); - - assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); }}); await(pleaseInterrupt);