From 265bc5f47d4c0b973fd09d3c2d7576f5f786399f Mon Sep 17 00:00:00 2001 From: Serguei Spitsyn Date: Wed, 14 May 2025 08:21:54 +0000 Subject: [PATCH] 8353496: SuspendResume1.java and SuspendResume2.java timeout after JDK-8319447 Reviewed-by: cjplummer, alanb --- .../jvmti/vthread/SuspendResume1/SuspendResume1.java | 8 ++++---- .../jvmti/vthread/SuspendResume2/SuspendResume2.java | 8 ++++---- .../jvmti/vthread/SuspendResumeAll/SuspendResumeAll.java | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume1/SuspendResume1.java b/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume1/SuspendResume1.java index e4673c3d017..39f9a1ab2ae 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume1/SuspendResume1.java +++ b/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume1/SuspendResume1.java @@ -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; diff --git a/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume2/SuspendResume2.java b/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume2/SuspendResume2.java index 7c7d21160ae..b773cf3fa0a 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume2/SuspendResume2.java +++ b/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume2/SuspendResume2.java @@ -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; diff --git a/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResumeAll/SuspendResumeAll.java b/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResumeAll/SuspendResumeAll.java index 342ba3ea996..35ea1611453 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResumeAll/SuspendResumeAll.java +++ b/test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResumeAll/SuspendResumeAll.java @@ -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;