Commit 095c23a
Fix flaky Find_Or_Create_Snapshot tests under random ordering
The tests failed intermittently in CI depending on the PHPUnit random
seed. Test_Find_Or_Create_Snapshot mocks archive.org at the HTTP layer
(pre_http_request), but several other test classes register fake clients
via the iawmlf_snapshot_client / iawmlf_link_checker_client filters and
only cleared them in set_up, never in tear_down. When one ran just before
Find_Or_Create, the stale client hijacked the event so get_latest_snapshot
returned null and the link stuck at 'pending' instead of 'new'/'done'.
- Defensive: clear both client filters in Find_Or_Create_Snapshot::set_up.
- Root cause: add tear_down cleanup to the set_up-only leakers
(Check_Snapshot_Status_Event, Action_Scheduler_Garbage_Collection,
Report_Table_Actions).
Verified: the previously-failing seed 1782941233 now passes, plus three
further random seeds - 355 tests green each.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent f6af7cf commit 095c23a
4 files changed
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
51 | 62 | | |
52 | 63 | | |
53 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
| |||
0 commit comments