mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8367983: javax/management/monitor/ThreadPoolTest.java and StartStopTest.java fail with Unexpected Maximum Pool Size Overflow!
Reviewed-by: cjplummer, dholmes
This commit is contained in:
parent
28879d3d03
commit
930d724923
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user