Commit 6e823e2
test: fix flaky test_drain_exits_when_deadline_exceeded_before_select
The test was racing - the clock manipulation would either exit too
early (before reading "DEADLINE_TEST") or too late (after reading
"SHOULD_NOT_APPEAR"). Fixed by making timing deterministic: track
when the main output has been flushed, then trigger timeout only
after that point but before reading "SHOULD_NOT_APPEAR".
This fixes intermittent failures where the assertion would fail
because the drain exited at the wrong time.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent dad0ecd commit 6e823e2
1 file changed
Lines changed: 8 additions & 1 deletion
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
57 | 62 | | |
58 | 63 | | |
59 | 64 | | |
| |||
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
86 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
| |||
0 commit comments