ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/AbstractExecutorServiceTest.java
(Generate patch)

Comparing jsr166/src/test/tck/AbstractExecutorServiceTest.java (file contents):
Revision 1.42 by jsr166, Tue Oct 6 00:41:47 2015 UTC vs.
Revision 1.43 by jsr166, Thu Oct 8 03:03:36 2015 UTC

# Line 449 | Line 449 | public class AbstractExecutorServiceTest
449      public void testTimedInvokeAny4() throws Exception {
450          final ExecutorService e = new DirectExecutorService();
451          try (PoolCleaner cleaner = cleaner(e)) {
452 +            long startTime = System.nanoTime();
453              List<Callable<String>> l = new ArrayList<Callable<String>>();
454              l.add(new NPETask());
455              try {
456 <                e.invokeAny(l, MEDIUM_DELAY_MS, MILLISECONDS);
456 >                e.invokeAny(l, LONG_DELAY_MS, MILLISECONDS);
457                  shouldThrow();
458              } catch (ExecutionException success) {
459                  assertTrue(success.getCause() instanceof NullPointerException);
460              }
461 +            assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
462          }
463      }
464  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines