fix(test): increase timeout in duration test to prevent flakiness #508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes CI test failure in
src/cli/doctor/runner.test.tswhere the duration measurement test was flaky.Problem
The test expected
>= 10msduration after sleeping for10ms, but occasionally received9msdue to:Solution
Increased the sleep duration from
10msto50mswhile keeping the>= 10msassertion. This provides sufficient buffer to prevent flakiness while still validating that duration measurement works correctly.Testing
bun test src/cli/doctor/runner.test.ts607 pass, 0 failacross 53 filesCloses #507
Summary by cubic
Increased sleep in the runner duration test from 10ms to 50ms to eliminate CI flakiness, preventing occasional under-10ms readings from timer precision and overhead while still asserting >=10ms duration. Fixes #507.
Written for commit df9a927. Summary will update on new commits.