From aaa2fc0cb4b0362261cbcc2fdf06bb873f9f3a9a Mon Sep 17 00:00:00 2001 From: Umputun Date: Wed, 9 Sep 2026 13:15:30 -0500 Subject: [PATCH] test(app): run launcher matrix tests in parallel 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. --- app/plugin_exit_code_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/plugin_exit_code_test.go b/app/plugin_exit_code_test.go index bbc58a80..12d9dee4 100644 --- a/app/plugin_exit_code_test.go +++ b/app/plugin_exit_code_test.go @@ -115,6 +115,7 @@ func assistantTranscriptLine(t *testing.T, phase, text string) string { } func TestShellLaunchersPreserveAnnotationExitCode(t *testing.T) { + t.Parallel() if runtime.GOOS == "windows" { t.Skip("shell launchers are not used on windows") } @@ -151,6 +152,7 @@ func TestShellLaunchersPreserveAnnotationExitCode(t *testing.T) { for _, launcher := range launchers { for _, backend := range launcherBackends() { t.Run(launcher.name+"/"+backend.name, func(t *testing.T) { + t.Parallel() for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { run := launcherRun{backend: backend, code: tc.code, output: tc.output} @@ -422,6 +424,7 @@ func TestAgtermPaneOverlayOptIn(t *testing.T) { // that reach the trap's close; the tab fallthrough closes nothing, and every case from the // dispatch onward is the preserve half. func TestHerdrSignalPaneOwnership(t *testing.T) { + t.Parallel() if runtime.GOOS == "windows" { t.Skip("shell launchers are not used on windows") } @@ -518,6 +521,7 @@ func TestHerdrSignalPaneOwnership(t *testing.T) { for lname, lpath := range launchers { for _, tc := range tests { t.Run(lname+"/"+tc.name, func(t *testing.T) { + t.Parallel() backend := launcherBackend{name: "herdr", command: "herdr", env: map[string]string{"HERDR_ENV": "1"}} env := fakeLauncherEnv(t, launcherRun{backend: backend, code: exitCodeAnnotations, output: "x\n"}) argsFile := filepath.Join(env["TMPDIR"], "herdr-args") @@ -603,6 +607,7 @@ func countHerdrCalls(calls []string, prefix string) int { // with the synchronous fake the sentinel exists before the wait loop starts, so the // liveness probe is only observable in the deferred-sentinel cases. func TestHerdrPaneOverlayOptIn(t *testing.T) { + t.Parallel() if runtime.GOOS == "windows" { t.Skip("shell launchers are not used on windows") } @@ -791,6 +796,7 @@ func TestHerdrPaneOverlayOptIn(t *testing.T) { for _, launcher := range launchers { for _, tc := range cases { t.Run(launcher.name+"/"+tc.name, func(t *testing.T) { + t.Parallel() backend := launcherBackend{name: "herdr", command: "herdr", env: map[string]string{ "HERDR_ENV": "1", }}