Files
Peter Wielander a0bb3121fc [core] Poll for the deferred check instead of sleeping past it
`Unit Tests (windows-latest)` has a second failure family alongside the
world-local preload timeout: `events-consumer.test.ts`, rotating between
lines 1005 and 1123 across main runs.

Eleven call sites slept `MIN_DEFERRED_CHECK_DELAY_MS * 4` and then asserted
an outcome the deferred check produces. That check is not on a fixed
schedule. It waits for delivery to go idle, which is its own poll loop, and
only then arms a `getDeferredCheckDelayMs()` timer, so the sleep is a lower
bound on when the timer becomes eligible rather than a guarantee it has run.
The helper's own comment already said assertions that a check DID fire should
poll instead; every one of the eleven ignored it.

Replace the sleep with `afterDeferredCheck`, which polls the assertion block.
The positive assertions gate the poll and the negatives alongside them are
evaluated once the check is known to have fired, which is what they mean.

Reproduced without a Windows runner by raising the stubbed delay 20x, which
makes the fixed sleep too short by construction: the old file fails exactly
at 1005 and 1123, the two lines CI reports, and the new file passes 45/45 at
the same delay.

Also drop the changeset to an empty one. Neither change affects users.
2026-08-12 13:14:48 -07:00
..
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00
2026-07-30 08:40:06 -07:00
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00
2026-08-11 12:30:28 -07:00