RFR: 8351002: com/sun/management/OperatingSystemMXBean cpuLoad tests fail intermittently [v2]

Kevin Walls kevinw at openjdk.org
Tue Mar 25 11:58:26 UTC 2025


On Mon, 24 Mar 2025 21:52:41 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

>> test/jdk/com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java line 45:
>> 
>>> 43:         for(int i = 0; i < 10; i++) {
>>> 44:             load = mbean.getProcessCpuLoad();
>>> 45:             if (load == -1.0) {
>> 
>> Please harden test to allow -1.0 on windows only.
>
> Thanks yes I was considering that, then I thought it seemed fair to me to permit all platforms to return -1, and as long as they start returning valid values, the test will pass.
> But we could make it stricter.

Updated!

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24186#discussion_r2011933784


More information about the serviceability-dev mailing list