Repository navigation
test: run test files in parallel - #388
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Owner
Author
|
Found in review, outside this PR's change. It comes from #383, and The "so only from source" run fails only when its pattern matches no test. I'll open an issue for it. 🤖 Generated with Claude Code |
This was referenced Oct 27, 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.
Part of #382
Problem
bun test --isolateruns test files one after another. The whole suite takes about 770 s from source and about 750 s fortest/e2e/against the binary on a 20-thread machine. Bun 1.4.3 has--parallel, which runs files in worker processes and implies--isolate. Nothing uses it.Change
package.json:testisbun test --parallel.ci.yml: the unit files, the "so only from source" run and the e2e files all use--parallel. On the one-fileforkandvendorshards it does nothing, but one form is simpler than two.release.yml: the whole-suite run isbun test --parallel.CONTRIBUTING.md: the local e2e command gains--parallel, and one line says what it does.Files run side by side. Tests inside one file still run in order.
CI wall time is bound by
fork.test.ts, which is one file, so the gain in CI is small. The gain is mostly local. The CI job times will be added from real runs.Verification
All on this 20-thread machine (i5-13500), Bun 1.4.3, back to back, 0 failures in every run.
bun test --isolate, from sourcebun test --parallel, from source, x3test/e2e/againstdist/patchbook, serialtest/e2e/againstdist/patchbook,--parallel, x3The counts match across all runs, so no test depends on running alone. Nothing was retried.
The limiter is
fork.test.ts. Bun's--timingsfile gives 167.5 s for it inside the 13-file parallel run, which is the wall time.vendor.test.tsis next at 129 s, thenintent.test.tsat 42 s. The other ten files add up to under 2 minutes. That is why 750 s becomes 167 s and not 750 / 20.One thing I can't explain.
fork.test.tson its own takes 262 s, both plain and with--parallel, and also when run withusage.test.ts. It takes 167 s when all 13 files run together. The CPU governor ispowersave, so a single busy core may clock lower than a loaded machine. I did not test that. CI'sforkshard runs that one file, so it should see the 262 s case on this machine, not the 167 s one.Not checked: macOS and the root jobs. I'm running
ci.ymlby hand on this branch to cover them.Written with Claude Sonnet 5.5 in Claude Code
🤖 Generated with Claude Code