Commit 9f716bd
test(multi-processes-execution): hoist iteration cap to the Fake (global guard)
The previous commit kept the iteration cap inside one anonymous fake used by
the new adversarial test only. That doesn't kill Infection's six timed-out
mutants on this class because the OTHER preexisting tests in the file run
against the same mutant first, hang (their MultiProcessesExecutionFake has
no cap), and Infection kills the entire PHPUnit process at its 120s limit
before the new test ever gets a chance to fail cleanly.
Hoisting the hasPendingWork() override to MultiProcessesExecutionFake makes
EVERY test in the file inherit the 200-iteration cap implicitly. Verified by
applying the M14 mutation (addProcessToQueue removed): all 40 tests in
MultiProcessesExecutionTest now fail with the cap-exceeded diagnostic in
~12s instead of hanging until the 120s timeout. Infection will record those
six mutants as Killed rather than Timed Out on the next run, with a
precise pointer to the run-loop regression.
Test simplified accordingly — the anonymous subclass goes away, the test
uses the shared Fake directly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d61ef02 commit 9f716bd
2 files changed
Lines changed: 57 additions & 32 deletions
File tree
- tests
- Doubles
- Unit/Tools/Execution
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
12 | 55 | | |
Lines changed: 14 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
484 | 482 | | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
494 | 491 | | |
495 | 492 | | |
496 | 493 | | |
| |||
519 | 516 | | |
520 | 517 | | |
521 | 518 | | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
| 519 | + | |
538 | 520 | | |
539 | 521 | | |
540 | 522 | | |
| |||
0 commit comments