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.64 by jsr166, Wed Jan 4 06:09:58 2017 UTC vs.
Revision 1.65 by jsr166, Sat Mar 25 21:41:10 2017 UTC

# Line 418 | Line 418 | public class ScheduledExecutorSubclassTe
418                  public void realRun() throws InterruptedException {
419                      threadStarted.countDown();
420                      assertEquals(0, p.getCompletedTaskCount());
421 <                    threadProceed.await();
421 >                    await(threadProceed);
422                      threadDone.countDown();
423                  }});
424              await(threadStarted);
425              assertEquals(0, p.getCompletedTaskCount());
426              threadProceed.countDown();
427 <            threadDone.await();
427 >            await(threadDone);
428              long startTime = System.nanoTime();
429              while (p.getCompletedTaskCount() != 1) {
430                  if (millisElapsedSince(startTime) > LONG_DELAY_MS)
# Line 814 | Line 814 | public class ScheduledExecutorSubclassTe
814          Runnable task = new CheckedRunnable() { public void realRun()
815                                                      throws InterruptedException {
816              poolBlocked.countDown();
817 <            assertTrue(unblock.await(LONG_DELAY_MS, MILLISECONDS));
817 >            await(unblock);
818              ran.getAndIncrement();
819          }};
820          List<Future<?>> blockers = new ArrayList<>();
# Line 822 | Line 822 | public class ScheduledExecutorSubclassTe
822          List<Future<?>> delayeds = new ArrayList<>();
823          for (int i = 0; i < poolSize; i++)
824              blockers.add(p.submit(task));
825 <        assertTrue(poolBlocked.await(LONG_DELAY_MS, MILLISECONDS));
825 >        await(poolBlocked);
826  
827          periodics.add(p.scheduleAtFixedRate(countDowner(periodicLatch1),
828                                              1, 1, MILLISECONDS));
# Line 858 | Line 858 | public class ScheduledExecutorSubclassTe
858              }
859          }
860          if (effectivePeriodicPolicy) {
861 <            assertTrue(periodicLatch1.await(LONG_DELAY_MS, MILLISECONDS));
862 <            assertTrue(periodicLatch2.await(LONG_DELAY_MS, MILLISECONDS));
861 >            await(periodicLatch1);
862 >            await(periodicLatch2);
863              for (Future<?> periodic : periodics) {
864                  assertTrue(periodic.cancel(false));
865                  assertTrue(periodic.isCancelled());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines