test(app): run launcher matrix tests in parallel - #356
Merged
Conversation
The three launcher tests accounted for 121s of the app package's 139s, run strictly serially, leaving about 26s of headroom under the 180s race budget on macOS. That budget already constrained test design: the stderr expectations were folded into an existing matrix rather than given their own pass to avoid crossing it. The subtests are independent - each gets its own TMPDIR, passes an explicit environment to its subprocess, and runs its launcher in its own process group - so marking them parallel is safe. The package drops to about 65s. t.Parallel() precedes the windows skip guard because tparallel otherwise reports the parent as serial.
There was a problem hiding this comment.
🟢 Approval recommended
The change is limited to test parallelization, and the test harness isolates per-subtest temp/state via per-test TMPDIR + explicit subprocess env, avoiding shared-process mutations.
Pull request overview
This PR reduces CI/runtime for the app package launcher-matrix tests by running independent subtests in parallel, improving headroom under the race-test timeout budget.
Changes:
- Mark
TestShellLaunchersPreserveAnnotationExitCode,TestHerdrSignalPaneOwnership, andTestHerdrPaneOverlayOptInas parallel. - Mark the launcher-matrix subtests (
t.Run(...)) inside those tests as parallel to enable concurrent execution across launcher/backends/cases.
File summaries
| File | Description |
|---|---|
| app/plugin_exit_code_test.go | Adds t.Parallel() to the three launcher matrix tests and their subtests to run the matrix concurrently and cut wall-clock time. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
the three launcher tests ran strictly serially and took 121s of the
apppackage's 139s, leaving about 26s of headroom under the 180s race budget. That budget already shaped test design: the stderr expectations were folded into an existing matrix instead of getting their own pass, to avoid crossing it.the 139 leaf subtests are independent. Each gets its own
TMPDIR, passes an explicit environment to its subprocess throughmergeEnv, and runs its launcher in its own process group viaSetpgid. Marking them parallel is safe on all three counts.result on a 20-core mac
apppackage, racethe win comes from saturating idle cores rather than overlapping idle waits. Individual subtests get slower under contention, so the work is process-spawn bound, not sleep bound.
two details worth recording:
t.Parallel()has to precede the windows skip guard, ortparallelstill reports the parent as serial.t.Setenvtests inconfig_test.goandtermbg_test.go. Go pauses every parallel test until all serial ones finish, so they never overlap and no env var can leak into a launcher subprocess.verification: 8 consecutive green runs of the three tests,
golangci-lintclean, and the full suite passing at the real-timeout=180s.