[cvs] / jsr166 / src / test / tck / AbstractExecutorServiceTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AbstractExecutorServiceTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.42, Tue Oct 6 00:41:47 2015 UTC revision 1.43, Thu Oct 8 03:03:36 2015 UTC
# Line 449  Line 449 
449      public void testTimedInvokeAny4() throws Exception {      public void testTimedInvokeAny4() throws Exception {
450          final ExecutorService e = new DirectExecutorService();          final ExecutorService e = new DirectExecutorService();
451          try (PoolCleaner cleaner = cleaner(e)) {          try (PoolCleaner cleaner = cleaner(e)) {
452                long startTime = System.nanoTime();
453              List<Callable<String>> l = new ArrayList<Callable<String>>();              List<Callable<String>> l = new ArrayList<Callable<String>>();
454              l.add(new NPETask());              l.add(new NPETask());
455              try {              try {
456                  e.invokeAny(l, MEDIUM_DELAY_MS, MILLISECONDS);                  e.invokeAny(l, LONG_DELAY_MS, MILLISECONDS);
457                  shouldThrow();                  shouldThrow();
458              } catch (ExecutionException success) {              } catch (ExecutionException success) {
459                  assertTrue(success.getCause() instanceof NullPointerException);                  assertTrue(success.getCause() instanceof NullPointerException);
460              }              }
461                assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
462          }          }
463      }      }
464    

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8