You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test suite contains ~684 sleep( call sites, with sleep re-declared per file as Bun.sleep (not portable to the Node/Deno smoke runs). Fixed sleeps before assertions are the primary flake source under load (see #290) and inflate suite duration. A shared polling helper that asserts on observable state instead of elapsed time removes most of them.
Scope
tests/util/awaitCondition(predicate, { timeoutMs, intervalMs, label }) with diagnostic timeout messages (style of tests/util/AsyncAssertions.ts), plus one portable sleep util for the few legitimate uses.
Convention documented: assert state, not time; prefer TestProbe.expectMessage / ManualScheduler where applicable.
Rationale
The test suite contains ~684
sleep(call sites, withsleepre-declared per file asBun.sleep(not portable to the Node/Deno smoke runs). Fixed sleeps before assertions are the primary flake source under load (see #290) and inflate suite duration. A shared polling helper that asserts on observable state instead of elapsed time removes most of them.Scope
tests/util/awaitCondition(predicate, { timeoutMs, intervalMs, label })with diagnostic timeout messages (style of tests/util/AsyncAssertions.ts), plus one portablesleeputil for the few legitimate uses.setTimeout/Bun.sleepin tests/ outside the util.Documentation
Acceptance
Relates
Improvement program M1 (foundation). #290, #325.