Repository navigation
test(relay): give the enrollment waits at least 3 s, not only 10,000 turns - #4078
Conversation
…turns shellEnrollment.test.tsx's `until` gave up after 10,000 event-loop turns. Turns are not time: on a loaded runner the WebCrypto and fetch work behind a pairing can take longer than those turns spin, and the test failed with "Enrollment did not reach the expected state" (Fast checks of #4074 on herdr-ci-ovis-parts-2; the rerun passed). The wait now also lasts at least 3 s of real time (process.hrtime, which the tests' fake timers do not move), under Bun's 5 s test timeout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
…y 2,000 digests (#4097) ## What `src/lib/relay/shell.test.tsx` waits for signed pairing steps with `untilSigned`, which gave up after 2,000 SHA-256 digests. Digests are not time: on a loaded runner the WebCrypto work behind a signed pairing can take longer than those turns. The Fast checks of #4085 failed that way on `herdr-ci-ovis-parts-2` ("gave up waiting for …" at lines 571 and 778); #4085 does not touch `src/lib/relay/`. Same fix as #4078 for `shellEnrollment.test.tsx`: the wait now also lasts at least 3 s of real time (`process.hrtime`, which fake timers do not move), so it never gives up sooner than before and stays under Bun's 5 s test timeout. Test-only: no app code changes. ## Validation - `bun run check fast`: passed (18,593 unit tests, typecheck, build, generated themes and types). - `bun test src/lib/relay/shell.test.tsx`: 35 pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
What
src/lib/relay/shellEnrollment.test.tsxwaits for the pairing flow with anuntilhelper that gave up after 10,000 event-loop turns. Turns are not time: on a loaded runner the WebCrypto and fetch work behind a pairing can take longer than those turns spin. The Fast checks of #4074 failed that way onherdr-ci-ovis-parts-2("Enrollment did not reach the expected state", in "looks for the introduction as the pairing was made"); the rerun passed on another runner, and #4074 does not touchsrc/lib/relay/.The helper now waits at least 3 s of real time as well as 10,000 turns, so it never gives up sooner than before. The clock is
process.hrtime, which the tests' fake timers do not move; 3 s stays under Bun's 5 s test timeout.Test-only: no app code changes.
Validation
bun run check fast: passed (18,593 unit tests, typecheck, build, generated themes and types).bun test src/lib/relay/shellEnrollment.test.tsx: 44 pass.🤖 Generated with Claude Code