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

Comparing jsr166/src/test/tck/ScheduledExecutorSubclassTest.java (file contents):
Revision 1.26 by jsr166, Sat May 28 15:33:19 2011 UTC vs.
Revision 1.27 by jsr166, Sun May 29 07:01:17 2011 UTC

# Line 370 | Line 370 | public class ScheduledExecutorSubclassTe
370                      threadProceed.await();
371                      threadDone.countDown();
372                  }});
373 <            assertTrue(threadStarted.await(SMALL_DELAY_MS, MILLISECONDS));
373 >            await(threadStarted);
374              assertEquals(0, p.getCompletedTaskCount());
375              threadProceed.countDown();
376              threadDone.await();
# Line 1204 | Line 1204 | public class ScheduledExecutorSubclassTe
1204              l.add(new StringTask());
1205              List<Future<String>> futures =
1206                  e.invokeAll(l, SHORT_DELAY_MS, MILLISECONDS);
1207 <            assertEquals(3, futures.size());
1208 <            Iterator<Future<String>> it = futures.iterator();
1209 <            Future<String> f1 = it.next();
1210 <            Future<String> f2 = it.next();
1211 <            Future<String> f3 = it.next();
1212 <            assertTrue(f1.isDone());
1213 <            assertTrue(f2.isDone());
1214 <            assertTrue(f3.isDone());
1215 <            assertFalse(f1.isCancelled());
1216 <            assertTrue(f2.isCancelled());
1207 >            assertEquals(l.size(), futures.size());
1208 >            for (Future future : futures)
1209 >                assertTrue(future.isDone());
1210 >            assertFalse(futures.get(0).isCancelled());
1211 >            assertTrue(futures.get(1).isCancelled());
1212          } finally {
1213              joinPool(e);
1214          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines