Commit e3ca0e8
test(anvil): tolerate stale-token ack failures in dead-worker race test
Under cargo-llvm-cov in CI, the test runs 5–10× slower than locally.
With recovery firing every 20 ms and a 60 s claim_age timeout, healthy
live claimers are still safe locally — but on a slow runner a single
claim/ack cycle can stretch enough that the recovery loop wins the
race, reclaims the live claim, and the next ack returns
"message_not_claimed".
Production claim/ack code already tolerates this benign outcome:
the message isn't lost — it's just owned by another worker now, and
will be acked by them on the next claim cycle. Mirror the same
tolerance in the test (skip the inserts on Err, keep going).
The final assertion (every produced msg in the acked set across all
claimers) still validates the no-loss invariant — it just allows the
ownership-transfer race that production handles naturally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent bf2446b commit e3ca0e8
1 file changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3126 | 3126 | | |
3127 | 3127 | | |
3128 | 3128 | | |
3129 | | - | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
3130 | 3142 | | |
3131 | 3143 | | |
3132 | | - | |
3133 | | - | |
3134 | | - | |
3135 | | - | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
3136 | 3150 | | |
3137 | 3151 | | |
3138 | 3152 | | |
| |||
0 commit comments