You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky on macOS CI: desktop::safety dropping_the_supervisor_lets_the_switch_trip_on_its_own #50
The test builds a Safety with a 120 ms deadline and a supervisor that beats every 20 ms.
It sleeps 60 ms, then asserts the switch is still live (line 513).
The supervisor thread went 136 ms without being scheduled. On a loaded runner, running ~2200 lib tests in parallel, that is enough to miss the deadline.
The code under test behaved correctly: it refused when it went unsupervised. What fails is the test's assumption that a thread gets CPU time within 120 ms.
Fix to make
Give the "still live" half of the test a deadline far longer than any scheduler stall (e.g. seconds). Keep the "trips once dropped" half by waiting for the refusal with a bounded poll instead of a fixed sleep(250ms). Check the sibling tests in the same module (e.g. the one around line 480, a 60 ms sleep then 120 ms) for the same pattern.
Activity
Merge pull request #51 from incordai/fix/safety-flaky-timing