Repository navigation
Commit 24df6c4
fix(test): the paused-walk cancel test holds the walk before it can finish, instead of racing it
live::cancel_returns_within_200ms_on_five_thousand_entries (tm-walk
tests/walk.rs, Phase 3) started a real walk of 5,050 entries, then paused
it and cancelled 30 ms later. A pause only takes hold at a worker's next
check, so a test thread descheduled between start() and pause() let the
whole walk finish first: "the walk completed (5050 entries) before the
cancel landed", seen once by T6b's agent under load (26 Sep 2026). The
test raced the clock.
Now the governor is paused before the walk starts, so each worker
completes at most the one folder it holds and parks in throttle() — the 51
folders cannot finish. The walk is then paused, the governor released, and
the test waits (counted, not timed) until a worker is parked in the walk's
pause before cancelling; take() runs behind a hang guard, so a cancel that
never reaches the paused walk fails instead of hanging.
Proved on a scratch copy: the old test with 300 ms between start() and
pause() goes red with the very message seen; the new test with the same
delay stays green; the new test goes red ("take() did not return within
10s") when a cancel no longer wakes the walk's pause.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent d26c9e4 commit 24df6c4
1 file changed
Lines changed: 34 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1628 | 1628 | | |
1629 | 1629 | | |
1630 | 1630 | | |
1631 | | - | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
1632 | 1634 | | |
1633 | 1635 | | |
1634 | 1636 | | |
| |||
2039 | 2041 | | |
2040 | 2042 | | |
2041 | 2043 | | |
2042 | | - | |
2043 | | - | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
2044 | 2054 | | |
2045 | | - | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
2046 | 2061 | | |
2047 | 2062 | | |
2048 | | - | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
2049 | 2068 | | |
2050 | | - | |
2051 | | - | |
2052 | | - | |
2053 | | - | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
2054 | 2075 | | |
2055 | 2076 | | |
2056 | 2077 | | |
2057 | | - | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
2058 | 2082 | | |
2059 | 2083 | | |
2060 | 2084 | | |
| |||
0 commit comments