From 930d7249239e464adfca3a007342ce0fcb8f070d Mon Sep 17 00:00:00 2001 From: Kevin Walls Date: Fri, 19 Sep 2025 08:15:28 +0000 Subject: [PATCH] 8367983: javax/management/monitor/ThreadPoolTest.java and StartStopTest.java fail with Unexpected Maximum Pool Size Overflow! Reviewed-by: cjplummer, dholmes --- test/jdk/javax/management/monitor/StartStopTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/jdk/javax/management/monitor/StartStopTest.java b/test/jdk/javax/management/monitor/StartStopTest.java index 4efbb45e609..2b0b5d92db5 100644 --- a/test/jdk/javax/management/monitor/StartStopTest.java +++ b/test/jdk/javax/management/monitor/StartStopTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,6 +63,8 @@ public class StartStopTest { static int maxPoolSize; static final AtomicInteger counter = new AtomicInteger(); + public static final int TIMEOUT = 2500; + // MBean class public class ObservedObject implements ObservedObjectMBean { volatile public boolean called = false; @@ -148,7 +150,7 @@ public class StartStopTest { for (int i = 0; i < nTasks; i++) monitor[i].start(); echo(">>> MONITORS started"); - doSleep(500); + doSleep(TIMEOUT); echo(">>> Check FLAGS true"); for (int i = 0; i < nTasks; i++) if (!monitored[i].called) { @@ -160,7 +162,7 @@ public class StartStopTest { for (int i = 0; i < nTasks; i++) monitor[i].stop(); echo(">>> MONITORS stopped"); - doSleep(500); + doSleep(TIMEOUT); echo(">>> Set FLAGS to false"); for (int i = 0; i < nTasks; i++) monitored[i].called = false;