[crac] RFR: 8362837: [CRaC] jdk/crac/MXBean.java can fail on macOS [v2]

Jan Kratochvil jkratochvil at openjdk.org
Sun Jul 20 19:52:04 UTC 2025


On Sun, 20 Jul 2025 16:18:17 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:

>> Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update copyright year
>
> test/jdk/jdk/crac/MXBean.java line 90:
> 
>> 88:         long restoreUptime = Long.parseLong(output.firstMatch("UptimeSinceRestore ([0-9-]+)", 1));
>> 89:         System.err.println("restoreUptime=" + restoreUptime);
>> 90:         if (restoreUptime < 0) {
> 
> AFAIK we have not had problems with this check, only with the below one. "UptimeSinceRestore" should be close to 0 on all platforms

What do you exactly mean by `close to 0`? I already mention here in the initial comment I did not implement `close to 0`. Do you mean less than `TIME_TOLERANCE`? But that is exactly the problem why it sometimes fails on Mac CI.

I am going to remove the `restoreUptime < 0` test when you do not like it.

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

PR Review Comment: https://git.openjdk.org/crac/pull/246#discussion_r2217934603


More information about the crac-dev mailing list