--- jsr166/src/test/tck/SynchronousQueueTest.java 2019/08/13 00:54:51 1.64 +++ jsr166/src/test/tck/SynchronousQueueTest.java 2019/12/16 22:55:54 1.67 @@ -18,7 +18,6 @@ import java.util.concurrent.CountDownLat import java.util.concurrent.Executors; import java.util.concurrent.ExecutorService; import java.util.concurrent.SynchronousQueue; -import java.util.concurrent.ThreadLocalRandom; import junit.framework.Test; @@ -209,12 +208,10 @@ public class SynchronousQueueTest extend 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); @@ -440,7 +437,7 @@ public class SynchronousQueueTest extend public void testToArray_null(boolean fair) { final SynchronousQueue q = new SynchronousQueue(fair); try { - Object[] o = q.toArray((Object[])null); + Object[] unused = q.toArray((Object[])null); shouldThrow(); } catch (NullPointerException success) {} }