8353496: SuspendResume1.java and SuspendResume2.java timeout after JDK-8319447

Reviewed-by: cjplummer, alanb
This commit is contained in:
Serguei Spitsyn 2025-05-14 08:21:54 +00:00
parent d1032d71bf
commit 265bc5f47d
3 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 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
@ -164,11 +164,11 @@ class TestedThread extends Thread {
// run in a loop
threadReady = true;
int i = 0;
int n = 1000;
int n = 100;
while (!shouldFinish) {
if (n <= 0) {
n = 1000;
SuspendResume1.sleep(10);
n = 100;
SuspendResume1.sleep(50);
}
if (i > n) {
i = 0;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 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
@ -158,11 +158,11 @@ class TestedThread extends Thread {
// run in a loop
threadReady = true;
int i = 0;
int n = 1000;
int n = 100;
while (!shouldFinish) {
if (n <= 0) {
n = 1000;
SuspendResume2.sleep(10);
n = 100;
SuspendResume2.sleep(50);
}
if (i > n) {
i = 0;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 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
@ -155,12 +155,12 @@ class TestedThread extends Thread {
// run in a loop
threadReady = true;
int i = 0;
int n = 1000;
int n = 100;
while (!shouldFinish) {
breakpointCheck();
if (n <= 0) {
n = 1000;
SuspendResumeAll.sleep(1);
n = 100;
SuspendResumeAll.sleep(50);
}
if (i > n) {
i = 0;