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

Comparing jsr166/src/test/tck/ForkJoinPoolTest.java (file contents):
Revision 1.66 by jsr166, Tue Oct 6 23:16:51 2015 UTC vs.
Revision 1.67 by jsr166, Thu Oct 8 03:03:36 2015 UTC

# Line 821 | Line 821 | public class ForkJoinPoolTest extends JS
821      public void testTimedInvokeAny4() throws Throwable {
822          ExecutorService e = new ForkJoinPool(1);
823          try (PoolCleaner cleaner = cleaner(e)) {
824 +            long startTime = System.nanoTime();
825              List<Callable<String>> l = new ArrayList<Callable<String>>();
826              l.add(new NPETask());
827              try {
828 <                e.invokeAny(l, MEDIUM_DELAY_MS, MILLISECONDS);
828 >                e.invokeAny(l, LONG_DELAY_MS, MILLISECONDS);
829                  shouldThrow();
830              } catch (ExecutionException success) {
831                  assertTrue(success.getCause() instanceof NullPointerException);
832              }
833 +            assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
834          }
835      }
836  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines