# X_TEST_REAL_SLEEP

## Means

a test waits for the wall clock — `Bun.sleep(n)`, `setTimeout(…, n > 1)`, `setInterval` — with no `// real-clock:` reason

## Typical cause

every run of the suite pays the wait, and a loaded runner turns "long enough" into a race; `@ultimat3/testing` says "No wall clock" and in tests it was prose — 355 sites under a green gate. A ratchet per package (`scripts/lib/test-real-sleep-pins.ts`): the count may fall and may never rise. An event-loop turn (`setTimeout(…, 0)`, `setImmediate`) is not a wait

## Fix

move time instead: `jest.useFakeTimers()` + `jest.advanceTimersByTime(ms)` for the timers the subject arms, `advanceClock` / the `clock` fixture for `Date.now()`, or await the event; another process's time only with `// real-clock: <why>` on the line or the line above

[CLI and verify](/error-codes#cli-and-verify)
