From 20c2511f54bbae0d41f8750f5e02c6b59630d66f Mon Sep 17 00:00:00 2001 From: "Alexandru C. Moraru" Date: Mon, 13 May 2024 09:17:37 +0000 Subject: [PATCH] 8309890: TestStringDeduplicationInterned.java waits for the wrong condition Backport-of: 63fe413d93861c79af5587859f01822980969c24 --- .../jtreg/gc/stringdedup/TestStringDeduplicationTools.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/hotspot/jtreg/gc/stringdedup/TestStringDeduplicationTools.java b/test/hotspot/jtreg/gc/stringdedup/TestStringDeduplicationTools.java index 32147e86d17..27256facaf6 100644 --- a/test/hotspot/jtreg/gc/stringdedup/TestStringDeduplicationTools.java +++ b/test/hotspot/jtreg/gc/stringdedup/TestStringDeduplicationTools.java @@ -377,10 +377,8 @@ public static void main(String[] args) { forceDeduplication(ageThreshold, FullGC); - if (!waitForDeduplication(dupString3, baseString)) { - if (getValue(dupString3) != getValue(internedString)) { - throw new RuntimeException("String 3 doesn't match either"); - } + if (!waitForDeduplication(dupString3, internedString)) { + throw new RuntimeException("Deduplication has not occurred for string 3"); } if (afterInternedValue != getValue(dupString2)) {