Commit d7e01ce
authored
test(action-ledger): make cleanup-stuck projection tests robust under host load (#709)
* test(action-ledger): make cleanup-stuck projection tests robust under host load
The scoped-rejection test gave the independent root a 1000ms CrabFleet
timeout, which also bounds projection queue wait. On a loaded host the
5ms polling loops can consume more than 1s of wall clock before the test
frees a slot, so the queued independent projection settled with 'queue
timed out after 1000ms' and could never start. Raise it to 30s and widen
the 500ms poll deadlines to 5s.
On failure the test also leaked its stuck cleanup resolvers, permanently
holding 3 of 4 global projection slots and cascading into the next test
('hold slots until response cleanup settles' saw started 1 !== 4).
Release the resolvers in a finally block so a failure stays scoped.
* test(action-ledger): release late-registered cleanup resolvers in failure teardown
Autoreview: after the finally block drains the resolver array, a queued
blocked post can still start and register a new stuck cleanup on a later
microtask, hanging the flush. Gate the mock on a release flag so any
cancel after teardown begins resolves immediately.1 parent 3beb5f0 commit d7e01ce
1 file changed
Lines changed: 31 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3254 | 3254 | | |
3255 | 3255 | | |
3256 | 3256 | | |
3257 | | - | |
| 3257 | + | |
| 3258 | + | |
3258 | 3259 | | |
3259 | 3260 | | |
| 3261 | + | |
3260 | 3262 | | |
3261 | 3263 | | |
3262 | 3264 | | |
3263 | 3265 | | |
3264 | 3266 | | |
3265 | 3267 | | |
3266 | | - | |
3267 | | - | |
3268 | | - | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
3269 | 3273 | | |
3270 | 3274 | | |
3271 | 3275 | | |
| |||
3279 | 3283 | | |
3280 | 3284 | | |
3281 | 3285 | | |
3282 | | - | |
3283 | | - | |
3284 | | - | |
3285 | | - | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
3286 | 3293 | | |
3287 | | - | |
3288 | | - | |
3289 | | - | |
3290 | | - | |
3291 | | - | |
3292 | | - | |
3293 | | - | |
3294 | | - | |
3295 | | - | |
3296 | | - | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
3297 | 3304 | | |
3298 | | - | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
3299 | 3311 | | |
3300 | | - | |
3301 | | - | |
3302 | 3312 | | |
3303 | 3313 | | |
3304 | 3314 | | |
| |||
0 commit comments