test(cli): generous timeout on --help exit-code tests (eliminate cold-start flake)#168
Merged
Merged
Conversation
help-and-exit.test.ts asserts exit codes, not performance, but ran under bun's default 5s timeout. run() lazily imports each command's (sometimes heavy: migrate-ts, codegen) module on first dispatch, so the first cold-start import on a cold/contended CI runner can exceed 5s and flake the suite — even though the whole file runs in ~115ms once warm. Give these tests a 30s timeout: keeps the exit-code assertions and still fails loudly on a genuine hang, but removes the timing sensitivity. (Surfaced as an intermittent 5001ms failure of 'each subcommand supports --help and exits 0' on the main push path.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ew1XfYSbEAezxjs9opynAe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Eliminates the intermittent
each subcommand supports --help and exits 0failure (a 5001ms timeout) seen on the main push path.Root cause:
help-and-exit.test.tsasserts exit codes, not performance, but ran under bun's default 5s timeout.run()lazily imports each command's module on first dispatch (some heavy — migrate-ts, codegen), so the first cold-start import on a cold/contended CI runner can exceed 5s and flake the suite — even though the whole file runs in ~115ms once warm.Fix: give these exit-code tests a 30s timeout. Keeps every assertion (and still fails loudly on a genuine hang or wrong exit code) while removing the timing sensitivity for a test that was never meant to measure performance.
Test-only change. Same "tight timeout trips under host contention" root cause as the sidecar readiness fix (#167); this clears the other place it surfaced.
🤖 Generated with Claude Code