From b37eaef281c2d8e73d5876842e179e476c7a6f2a Mon Sep 17 00:00:00 2001 From: Ivan Walulya Date: Tue, 26 Apr 2022 20:48:07 +0000 Subject: [PATCH] 8178969: [TESTBUG] Wrong reporting of gc/g1/humongousObjects/TestHeapCounters test. --- .../jtreg/gc/g1/humongousObjects/TestHeapCounters.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/hotspot/jtreg/gc/g1/humongousObjects/TestHeapCounters.java b/test/hotspot/jtreg/gc/g1/humongousObjects/TestHeapCounters.java index db453b04a7b7f..2f86fc5d6bb24 100644 --- a/test/hotspot/jtreg/gc/g1/humongousObjects/TestHeapCounters.java +++ b/test/hotspot/jtreg/gc/g1/humongousObjects/TestHeapCounters.java @@ -162,7 +162,7 @@ public static void main(String[] args) { if (gcCountNow == gcCountBefore) { // We should allocate at least allocation.expectedSize Asserts.assertGreaterThanOrEqual(usedMemoryAfter - usedMemoryBefore, expectedAllocationSize, - "Counter of type " + memoryCounter.getClass().getSimpleName() + + "Counter of type " + memoryCounter.toString() + " returned wrong allocation size"); } else { System.out.println("GC happened during allocation so the check is skipped"); @@ -184,7 +184,7 @@ public static void main(String[] args) { // We should free at least allocation.expectedSize * ALLOCATION_SIZE_TOLERANCE_FACTOR Asserts.assertGreaterThanOrEqual(usedMemoryBefore - usedMemoryAfter, (long) (allocation.expectedSize * ALLOCATION_SIZE_TOLERANCE_FACTOR), - "Counter of type " + memoryCounter.getClass().getSimpleName() + " returned wrong allocation size"); + "Counter of type " + memoryCounter.toString() + " returned wrong allocation size"); }); } }