--- jsr166/src/test/tck/ScheduledExecutorTest.java 2015/10/06 16:39:06 1.74 +++ jsr166/src/test/tck/ScheduledExecutorTest.java 2015/10/08 03:03:36 1.75 @@ -1046,14 +1046,16 @@ public class ScheduledExecutorTest exten public void testTimedInvokeAny4() throws Exception { final ExecutorService e = new ScheduledThreadPoolExecutor(2); try (PoolCleaner cleaner = cleaner(e)) { + long startTime = System.nanoTime(); List> l = new ArrayList>(); l.add(new NPETask()); try { - e.invokeAny(l, MEDIUM_DELAY_MS, MILLISECONDS); + e.invokeAny(l, LONG_DELAY_MS, MILLISECONDS); shouldThrow(); } catch (ExecutionException success) { assertTrue(success.getCause() instanceof NullPointerException); } + assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); } }