Skip to content

Commit 595b203

Browse files
author
duke
committed
Backport 6a07820483bcf3e9d7df27ee496db43675f1c002
1 parent d1c21c6 commit 595b203

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/jdk/java/util/concurrent/tck/ScheduledExecutorTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,11 +700,13 @@ public void testShutdownNow() throws InterruptedException {
700700
public void testShutdownNow_delayedTasks() throws InterruptedException {
701701
final ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1);
702702
List<ScheduledFuture<?>> tasks = new ArrayList<>();
703+
final int DELAY = 100;
704+
703705
for (int i = 0; i < 3; i++) {
704706
Runnable r = new NoOpRunnable();
705-
tasks.add(p.schedule(r, 9, SECONDS));
706-
tasks.add(p.scheduleAtFixedRate(r, 9, 9, SECONDS));
707-
tasks.add(p.scheduleWithFixedDelay(r, 9, 9, SECONDS));
707+
tasks.add(p.schedule(r, DELAY, SECONDS));
708+
tasks.add(p.scheduleAtFixedRate(r, DELAY, DELAY, SECONDS));
709+
tasks.add(p.scheduleWithFixedDelay(r, DELAY, DELAY, SECONDS));
708710
}
709711
if (testImplementationDetails)
710712
assertEquals(new HashSet<Object>(tasks), new HashSet<Object>(p.getQueue()));

0 commit comments

Comments
 (0)