[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.8, Tue Dec 23 19:40:24 2003 UTC revision 1.9, Thu Dec 25 19:48:57 2003 UTC
# Line 757  Line 757 
757       * timed invokeAll(c) cancels tasks not completed by timeout       * timed invokeAll(c) cancels tasks not completed by timeout
758       */       */
759      public void testTimedInvokeAll6() {      public void testTimedInvokeAll6() {
760          ExecutorService e = Executors.newCachedThreadPool();          ExecutorService e = new DirectExecutorService();
761          try {          try {
762              ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();              ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
763              l.add(new StringTask());              l.add(new StringTask());
764              l.add(Executors.callable(new MediumInterruptedRunnable(), TEST_STRING));              l.add(Executors.callable(new LongPossiblyInterruptedRunnable(), TEST_STRING));
765              List<Future<String>> result = e.invokeAll(l, SHORT_DELAY_MS, TimeUnit.MILLISECONDS);              List<Future<String>> result = e.invokeAll(l, SHORT_DELAY_MS, TimeUnit.MILLISECONDS);
766              assertEquals(2, result.size());              assertEquals(2, result.size());
767              Iterator<Future<String>> it = result.iterator();              Iterator<Future<String>> it = result.iterator();
# Line 770  Line 770 
770              assertTrue(f1.isDone());              assertTrue(f1.isDone());
771              assertFalse(f1.isCancelled());              assertFalse(f1.isCancelled());
772              assertTrue(f2.isDone());              assertTrue(f2.isDone());
773              assertTrue(f2.isCancelled());              //            assertTrue(f2.isCancelled());
774          } catch(Exception ex) {          } catch(Exception ex) {
775              unexpectedException();              unexpectedException();
776          } finally {          } finally {

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8