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.95 by jsr166, Mon Jul 17 22:27:31 2017 UTC vs.
Revision 1.97 by jsr166, Sat Nov 24 21:41:21 2018 UTC

# Line 607 | Line 607 | public class ScheduledExecutorTest exten
607          final ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1);
608          try (PoolCleaner cleaner = cleaner(p, releaser)) {
609              for (int i = 0; i < tasks.length; i++)
610 <                tasks[i] = p.schedule(new SmallPossiblyInterruptedRunnable(),
610 >                tasks[i] = p.schedule(possiblyInterruptedRunnable(SMALL_DELAY_MS),
611                                        LONG_DELAY_MS, MILLISECONDS);
612              int max = tasks.length;
613              if (tasks[4].cancel(true)) --max;
# Line 804 | Line 804 | public class ScheduledExecutorTest exten
804          immediates.forEach(
805              f -> assertTrue(((ScheduledFuture)f).getDelay(NANOSECONDS) <= 0L));
806  
807 <        Stream.of(immediates, delayeds, periodics).flatMap(c -> c.stream())
807 >        Stream.of(immediates, delayeds, periodics).flatMap(Collection::stream)
808              .forEach(f -> assertFalse(f.isDone()));
809  
810          try { p.shutdown(); } catch (SecurityException ok) { return; }
# Line 858 | Line 858 | public class ScheduledExecutorTest exten
858  
859          assertTrue(q.isEmpty());
860  
861 <        Stream.of(immediates, delayeds, periodics).flatMap(c -> c.stream())
861 >        Stream.of(immediates, delayeds, periodics).flatMap(Collection::stream)
862              .forEach(f -> assertTrue(f.isDone()));
863  
864          for (Future<?> f : immediates) assertNull(f.get());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines