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.9 by dl, Thu Dec 25 19:48:57 2003 UTC vs.
Revision 1.11 by dl, Sun Dec 28 21:56:18 2003 UTC

# Line 1 | Line 1
1   /*
2 < * Written by members of JCP JSR-166 Expert Group and released to the
3 < * public domain. Use, modify, and redistribute this code in any way
4 < * without acknowledgement. Other contributors include Andrew Wright,
5 < * Jeffrey Hayes, Pat Fischer, Mike Judd.
2 > * Written by Doug Lea with assistance from members of JCP JSR-166
3 > * Expert Group and released to the public domain, as explained at
4 > * http://creativecommons.org/licenses/publicdomain
5 > * Other contributors include Andrew Wright, Jeffrey Hayes,
6 > * Pat Fisher, Mike Judd.
7   */
8  
9  
# Line 761 | Line 762 | public class AbstractExecutorServiceTest
762          try {
763              ArrayList<Callable<String>> l = new ArrayList<Callable<String>>();
764              l.add(new StringTask());
765 <            l.add(Executors.callable(new LongPossiblyInterruptedRunnable(), TEST_STRING));
765 >            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);
768 <            assertEquals(2, result.size());
768 >            assertEquals(3, result.size());
769              Iterator<Future<String>> it = result.iterator();
770              Future<String> f1 = it.next();
771              Future<String> f2 = it.next();
772 +            Future<String> f3 = it.next();
773              assertTrue(f1.isDone());
774              assertFalse(f1.isCancelled());
775              assertTrue(f2.isDone());
776 <            //            assertTrue(f2.isCancelled());
776 >            assertTrue(f3.isDone());
777 >            assertTrue(f3.isCancelled());
778          } catch(Exception ex) {
779              unexpectedException();
780          } finally {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines