Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: fix spurious failure on busy system
``` File "ocaml/libs/clock/dune", line 27, characters 19-33: 27 | (names test_date test_timer_run) ^^^^^^^^^^^^^^ qcheck random seed: 423397317 Testing `Timer'. This run has ID `D009HP55'. �[<35;18;6M F............. ┌──────────────────────────────────────────────────────────────────────────────┐ │ [FAIL] Timer 0 Timer.remaining. │ └──────────────────────────────────────────────────────────────────────────────┘ Sleeping for 0.150000 seconds... Sleeping for 0.000500 seconds... test `Timer.remaining` failed on ≥ 1 cases: 1ms Expected to have spare time, but got excess: 1.91μs. Duration: 1ms, actual: 999μs, timer: elapsed: 1.03ms duration: 1ms ``` Here we asked for a sleep of 0.5ms, but got woken up twice as late. And the quickcheck property was expecting that the actual wake up time won't be twice as wrong. In reality it can wake up by arbitrary amounts of time later based on how busy the OS is, but we do need to check that the wakeups are not completely wrong. So skip the check on very short durations, but keep it on the longer 100ms and 300ms tests. Signed-off-by: Edwin Török <[email protected]>
- Loading branch information