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.69 by jsr166, Mon Jul 17 22:27:31 2017 UTC vs.
Revision 1.72 by jsr166, Fri Sep 6 18:43:35 2019 UTC

# Line 649 | Line 649 | public class ScheduledExecutorSubclassTe
649          final CustomExecutor p = new CustomExecutor(1);
650          try (PoolCleaner cleaner = cleaner(p, releaser)) {
651              for (int i = 0; i < tasks.length; i++)
652 <                tasks[i] = p.schedule(new SmallPossiblyInterruptedRunnable(),
652 >                tasks[i] = p.schedule(possiblyInterruptedRunnable(SMALL_DELAY_MS),
653                                        LONG_DELAY_MS, MILLISECONDS);
654              int max = tasks.length;
655              if (tasks[4].cancel(true)) --max;
# Line 680 | Line 680 | public class ScheduledExecutorSubclassTe
680          Runnable waiter = new CheckedRunnable() { public void realRun() {
681              threadsStarted.countDown();
682              try {
683 <                MILLISECONDS.sleep(2 * LONG_DELAY_MS);
683 >                MILLISECONDS.sleep(LONGER_DELAY_MS);
684              } catch (InterruptedException success) {}
685              ran.getAndIncrement();
686          }};
# Line 845 | Line 845 | public class ScheduledExecutorSubclassTe
845          immediates.forEach(
846              f -> assertTrue(((ScheduledFuture)f).getDelay(NANOSECONDS) <= 0L));
847  
848 <        Stream.of(immediates, delayeds, periodics).flatMap(c -> c.stream())
848 >        Stream.of(immediates, delayeds, periodics).flatMap(Collection::stream)
849              .forEach(f -> assertFalse(f.isDone()));
850  
851          try { p.shutdown(); } catch (SecurityException ok) { return; }
# Line 899 | Line 899 | public class ScheduledExecutorSubclassTe
899  
900          assertTrue(q.isEmpty());
901  
902 <        Stream.of(immediates, delayeds, periodics).flatMap(c -> c.stream())
902 >        Stream.of(immediates, delayeds, periodics).flatMap(Collection::stream)
903              .forEach(f -> assertTrue(f.isDone()));
904  
905          for (Future<?> f : immediates) assertNull(f.get());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines