RFR: 8357285 : JSR166 Test case testShutdownNow_delayedTasks failed

Mikhail Yankelevich myankelevich at openjdk.org
Thu May 22 14:57:55 UTC 2025


On Thu, 22 May 2025 14:19:09 GMT, Viktor Klang <vklang at openjdk.org> wrote:

> Barring other effects, it is likely that this test just needs to have some longer timeouts to ensure that a stall isn't likely to fail the test case. The shouldn't have any impact on test execution duration, as the test looks at tasks which *have not executed yet*.

test/jdk/java/util/concurrent/tck/ScheduledExecutorTest.java line 703:

> 701:         final ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1);
> 702:         List<ScheduledFuture<?>> tasks = new ArrayList<>();
> 703:         final int DELAY = 100;

What do you think of trying to change this to `Utils.adjustTimeout(100)` so the env could change this depending on the factor used? This way may be the delay won't need to be as large.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25394#discussion_r2102774011


More information about the core-libs-dev mailing list