Commit 6b7973a
fix(dc_bridge): stop supervisor_test flaking on loaded CI runners
Supervisor.RestartsProcessThatExitsOnItsOwn and RespectsRestartBackoff asserted the
supervised child had exited after a fixed sleep_for(200-300ms) — a margin that assumes
fork+exec+process-teardown always gets scheduled that fast, which a shared/loaded CI
runner can blow (observed failing once on GitHub Actions right after a full workspace
build, while passing locally and on the prior jazzy CI run with identical code).
Replace the fixed-sleep-then-assert with the poll-until-condition-or-deadline pattern
this same test file already uses correctly in SupervisedProcessDiesWithItsSpawner:
wait_until() polls every 10ms up to a 5s deadline instead of guessing a wall-clock
margin, so it only waits as long as actually needed and still fails loudly on a real
hang. Verified: 30/30 clean runs of supervisor_test in the same Podman workspace image
CI uses, after an incremental `colcon build --packages-select dc_bridge`.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01StNXjcK7b1kY2KYRd8qN6N
Signed-off-by: David Bensoussan <d.bensoussan@proton.me>1 parent 48c816c commit 6b7973a
1 file changed
Lines changed: 24 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
25 | 46 | | |
26 | 47 | | |
27 | 48 | | |
| |||
30 | 51 | | |
31 | 52 | | |
32 | 53 | | |
33 | | - | |
34 | | - | |
| 54 | + | |
35 | 55 | | |
36 | 56 | | |
37 | 57 | | |
| |||
41 | 61 | | |
42 | 62 | | |
43 | 63 | | |
44 | | - | |
45 | | - | |
| 64 | + | |
46 | 65 | | |
47 | 66 | | |
48 | | - | |
49 | | - | |
| 67 | + | |
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
| |||
0 commit comments