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

Comparing jsr166/src/test/tck/ScheduledExecutorTest.java (file contents):
Revision 1.44 by jsr166, Sat May 28 15:33:20 2011 UTC vs.
Revision 1.45 by jsr166, Sun May 29 07:01:17 2011 UTC

# Line 320 | Line 320 | public class ScheduledExecutorTest exten
320                      threadProceed.await();
321                      threadDone.countDown();
322                  }});
323 <            assertTrue(threadStarted.await(SMALL_DELAY_MS, MILLISECONDS));
323 >            await(threadStarted);
324              assertEquals(0, p.getCompletedTaskCount());
325              threadProceed.countDown();
326              threadDone.await();
# Line 1155 | Line 1155 | public class ScheduledExecutorTest exten
1155              l.add(new StringTask());
1156              List<Future<String>> futures =
1157                  e.invokeAll(l, SHORT_DELAY_MS, MILLISECONDS);
1158 <            assertEquals(3, futures.size());
1159 <            Iterator<Future<String>> it = futures.iterator();
1160 <            Future<String> f1 = it.next();
1161 <            Future<String> f2 = it.next();
1162 <            Future<String> f3 = it.next();
1163 <            assertTrue(f1.isDone());
1164 <            assertTrue(f2.isDone());
1165 <            assertTrue(f3.isDone());
1166 <            assertFalse(f1.isCancelled());
1167 <            assertTrue(f2.isCancelled());
1158 >            assertEquals(l.size(), futures.size());
1159 >            for (Future future : futures)
1160 >                assertTrue(future.isDone());
1161 >            assertFalse(futures.get(0).isCancelled());
1162 >            assertTrue(futures.get(1).isCancelled());
1163          } finally {
1164              joinPool(e);
1165          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines