jmx-dev RFR: 8351002: com/sun/management/OperatingSystemMXBean cpuLoad tests fail intermittently [v2]
Kevin Walls
kevinw at openjdk.org
Mon Mar 24 21:55:20 UTC 2025
On Mon, 24 Mar 2025 20:12:45 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> Kevin Walls has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - whitespace
>> - whitespace
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24186#discussion_r2010975156
More information about the jmx-dev
mailing list