Repository navigation
test: give the command cleanup tests room on a busy CI runner - #142
Merged
Merged
Conversation
Four tests that spawn a shell expected their command to end within 2 seconds. Locally they take under half a second, but on CI, where Swift Testing runs them beside the native rendering tests, they took 2.1 to 2.3 seconds and failed on main and in pull requests. The limit only has to tell a prompt end from one that waits for the 10-second command timeout or a 30-second sleep, so 5 seconds still catches a regression.
This was referenced Oct 21, 2026
|
🎉 This PR is included in version 0.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Problem
Four tests that spawn a shell expect their command to end within 2 seconds. On CI they sometimes take 2.1 to 2.3 seconds and fail, even though nothing is wrong:
commandOutputHasABoundedSizeandexitingStreamStopsChildrenHoldingItsPipesfailed themainrun for fix: make the whole popup block clickable #139 (2.13 s, 2.13 s and 2.32 s).commandOutputHasABoundedSizeorcommandTimeoutClosesPipesHeldByChildrenAfterTheShellExitsalso failedmainafter fix: allow calendar access in Developer ID releases #112 and fix: keep new beta releases in order on GitHub #117 and at least two pull requests, with none of those changes touching commands.Locally all four finish in 0.04 to 0.31 seconds. On CI, Swift Testing runs them beside the native rendering tests, and spawning the shell waits for the busy runner. This is the same kind of failure that f09c14c fixed for the main-actor timing tests.
Changes
commandOutputHasABoundedSize,cancellingOrTimingOutStopsShellChildren,commandTimeoutClosesPipesHeldByChildrenAfterTheShellExitsandexitingStreamStopsChildrenHoldingItsPipesnow expect their command to end within 5 seconds instead of 2.Each limit only has to tell a prompt end from a regression that waits for the 10-second default command timeout or a child's
sleep 30, so 5 seconds still catches one.I left
cancellingAWidgetStopsItsRunningCommandat 2 seconds. Its command issleep 5, so a 5-second limit could no longer tell cancellation from the sleep finishing, and it hasn't failed in the runs I checked.Testing
swift test --filteron the four tests: all pass, in 0.04 to 0.31 seconds.git diff --checkand commitlint pass.Merging
One commit. Any merge method works; the title matches the commit message. A
test:commit makes no release.Claude Opus 5.5 via Claude Code in T3 Code.