Commit 03251d7
fix(test): stop run --all --wait from polling queued runs past the shared deadline (#130)
runTestRunAll computes each member's poll budget as
Math.max(1, ceil(batchDeadlineMs - now)), so a run whose turn arrives
after the shared --timeout deadline still gets a fresh >=1s poll. With
--max-concurrency bounding the fan-out, a batch could overshoot the
documented shared deadline and report a late 'passed' for a member that
should have been reported as 'timeout' (exit 7).
Guard the poll helper the same way the create-batch --run --wait path
already does: if the shared deadline is exhausted before a member's
poll starts, return the existing timeout-shaped member result without
calling pollRunUntilTerminal. Regression test drives the clock past the
deadline during the first member's poll and asserts the second member
is never polled and reports 'timeout'.
Co-authored-by: ahndohun <19940813+ahndohun@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 03c4f11 commit 03251d7
2 files changed
Lines changed: 69 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2487 | 2487 | | |
2488 | 2488 | | |
2489 | 2489 | | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
2490 | 2545 | | |
2491 | 2546 | | |
2492 | 2547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5432 | 5432 | | |
5433 | 5433 | | |
5434 | 5434 | | |
5435 | | - | |
| 5435 | + | |
| 5436 | + | |
| 5437 | + | |
| 5438 | + | |
| 5439 | + | |
| 5440 | + | |
| 5441 | + | |
| 5442 | + | |
| 5443 | + | |
| 5444 | + | |
| 5445 | + | |
| 5446 | + | |
| 5447 | + | |
| 5448 | + | |
5436 | 5449 | | |
5437 | 5450 | | |
5438 | 5451 | | |
| |||
0 commit comments