test: deflake concurrent CLI and Windows ssh unit tests#1043
Merged
Conversation
Assert eventual removal of the lock/progress files in the concurrent download tests instead of racing the peer re-acquire window, and give the end-to-end ssh spawn test a larger timeout on Windows runners.
mtojek
approved these changes
Jul 21, 2026
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.
Fixes two flaky unit tests seen on CI.
cliManager.concurrent.test.ts: the lock/progress cleanup assertions raced the library's peer re-acquire window — a waiter can recreate the.lockdir after the first downloader releases it, so the one-shotfs.access(...).rejects.toThrow()intermittently failed. Assert eventual removal via avi.waitForhelper (expectLockFilesRemoved).sshSupport.test.ts > "current shell supports ssh": spawns the realssh -V, which took >10s on the Windows runner and hit the 10stestTimeout. Kept it end-to-end; bumped the timeout to 30s on Windows only.Both remain behavior tests (no mocking).
Generated by Coder Agents on behalf of @EhabY.