8373086: Make isexceeded001.java more robust

Reviewed-by: ayang, jsikstro
Backport-of: 4d696d0d0ed523e3c99c68214586673913b1c7b5
This commit is contained in:
SendaoYan 2025-12-10 02:15:09 +00:00
parent bf0bc37924
commit ec6beaa20a
2 changed files with 2 additions and 7 deletions

View File

@ -187,9 +187,3 @@ vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001/forceEa
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005/TestDescription.java 8076494 windows-x64
vmTestbase/nsk/monitoring/ThreadMXBean/findMonitorDeadlockedThreads/find006/TestDescription.java 8310144 macosx-aarch64
vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded001/TestDescription.java 8373022 generic-all
vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded002/TestDescription.java 8373022 generic-all
vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded003/TestDescription.java 8373022 generic-all
vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded004/TestDescription.java 8373022 generic-all
vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded005/TestDescription.java 8373022 generic-all

View File

@ -92,7 +92,8 @@ public class isexceeded001 {
// but cannot assume this affects the pool we are testing.
b = new byte[INCREMENT];
isExceeded = monitor.isUsageThresholdExceeded(pool);
// Ensure the observation of isExceeded is sticky to match peakUsage.
isExceeded = isExceeded || monitor.isUsageThresholdExceeded(pool);
log.display(" Allocated heap. isExceeded = " + isExceeded);
// Fetch usage information: use peak usage in comparisons below, in case usage went up and then down.