Repository navigation
test(core): harden timing-sensitive process and project-copy tests - #48205
bunnysayzz wants to merge 1 commit into
Conversation
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
de48bd6 to
c672ef5
Compare
c672ef5 to
8a4b815
Compare
|
Rebased onto latest dev (was 12 behind, clean rebase, no conflicts). Re-verified after the rebase: process suite 24 pass, project-copy suite 13 pass. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #37321
Type of change
What does this PR do?
Fixes the two timing flakes from the CI run in #37321. Test-only changes, no product code touched.
packages/core/test/process/process.test.ts:waitForFilereturned the first successful read. The child writes the readiness file withwriteFileSync, which creates the file before its contents land, so the helper could observe it right after creation and return""(Expected: /^\d+$/ Received: ""). It now only returns once the file is non-empty, sleeping 10ms between attempts either way. All four call sites expect non-empty contents (PID regex twice,"settled"twice), so no legitimate empty read exists.packages/core/test/project-copy.test.ts:refresh ignores stale git worktree registrationsruns twogit worktree addcalls plus a recursive remove on top ofsetup()'s git init, which blows the default live-test timeout on loaded Windows runners. Bumped to 15s with a comment saying why.Prior attempt #37377 did the same two things but was closed unmerged without review; this re-applies them on current
dev, where the flaky helper is still byte-identical to the version in the issue.How did you verify your code works?
bun test test/process/process.test.tsinpackages/core: 24 pass, repeated 3x, 0 fail.bun test test/project-copy.test.tsinpackages/core: 13 pass, repeated 3x, 0 fail.bun typecheckinpackages/core: clean.Screenshots / recordings
Not a UI change.
Checklist