sentinel-group / sentinel-rust

Sentinel Rust version
Apache License 2.0
132 stars 22 forks source link

Unexpected failures on Windows and MacOS #42

Closed Forsworns closed 2 years ago

Forsworns commented 2 years ago

See failures on Windows and MacOS.

In short, core::system_metric::test::process_cpu_stat fails randomly both on windows-lastest and macos-latest. core::stat::base::leap_array::test::valid_headt fails randomly on macos-latest. (This failure is more severe).

Local tests on Windows10 and Windows11 never fail. Docker Image sickcodes/Docker-OSX is hard to deploy on WSL, so I didn't test MacOS locally.

Forsworns commented 2 years ago

Takeaway: Windows Server 2019 takes more time to create a thread and acquire a lock. The thread::sleep in millisecond is not accurate on MacOS 11.

Forsworns commented 2 years ago

It fails again on Windows Server 2022....

Forsworns commented 2 years ago

Similar reason as the core::stat::base::leap_array::test::valid_head failure on MacOS 11, f6b2831b42d03f0378a97f548ff938b1fb5ff33a