[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.10, Sat Dec 27 19:26:42 2003 UTC revision 1.11, Sun Dec 28 21:56:18 2003 UTC
# Line 762  Line 762 
762          try {          try {
763              ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();              ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
764              l.add(new StringTask());              l.add(new StringTask());
765              l.add(Executors.callable(new LongPossiblyInterruptedRunnable(), TEST_STRING));              l.add(Executors.callable(new MediumPossiblyInterruptedRunnable(), TEST_STRING));
766                l.add(new StringTask());
767              List<Future<String>> result = e.invokeAll(l, SHORT_DELAY_MS, TimeUnit.MILLISECONDS);              List<Future<String>> result = e.invokeAll(l, SHORT_DELAY_MS, TimeUnit.MILLISECONDS);
768              assertEquals(2, result.size());              assertEquals(3, result.size());
769              Iterator<Future<String>> it = result.iterator();              Iterator<Future<String>> it = result.iterator();
770              Future<String> f1 = it.next();              Future<String> f1 = it.next();
771              Future<String> f2 = it.next();              Future<String> f2 = it.next();
772                Future<String> f3 = it.next();
773              assertTrue(f1.isDone());              assertTrue(f1.isDone());
774              assertFalse(f1.isCancelled());              assertFalse(f1.isCancelled());
775              assertTrue(f2.isDone());              assertTrue(f2.isDone());
776              //            assertTrue(f2.isCancelled());              assertTrue(f3.isDone());
777                assertTrue(f3.isCancelled());
778          } catch(Exception ex) {          } catch(Exception ex) {
779              unexpectedException();              unexpectedException();
780          } finally {          } finally {

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8