You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
package main uses mutable globals as test seams, blocking t.Parallel #266
Partly done in 496df99 (plan steps 1-3): the five seams are now per-run fields on runArgs (signals, signalReady, sourceURLs, axfrPort), the tests pass them via runCLIWith/runCLIMergedWith, and the package variables are gone. Verified with the root package tests (x8 on Windows), golangci-lint v2.15.0 (windows and linux).
Still open (step 4): adding t.Parallel() to the root tests. Each run calls signal.Notify and TestE2ESIGTERMExits143 sends SIGTERM to the whole process, so parallel runs would interrupt each other; that test (or signal handling) needs isolating first, and other package-level state should be audited before turning parallelism on.
Step 4 is done in d0c56f0: 58 TestE2E* tests in the root package now call t.Parallel(), which cuts go test . from about 10.5 s to 3.6 s on Windows.
Seven stay serial on purpose: the ones that call t.Setenv or os.Chdir (they panic or race under t.Parallel), and TestE2ESIGTERMExits143. Go runs every serial top-level test before it resumes any parallel one, so that test's process-wide SIGTERM can't reach a parallel run. The other shared state I found is safe: the default SUBENUM_STATE file is only written after a signal, and TestE2EResume passes its own -state.
Verified with go test -race -shuffle=on -count=4 . on Windows and three shuffled runs of a Linux test binary under WSL, including the SIGTERM test.
Activity
Move package main's test seams onto runArgs (#266)
TMHSDigital commentedon Nov 14, 2026
Partly done in 496df99 (plan steps 1-3): the five seams are now per-run fields on runArgs (signals, signalReady, sourceURLs, axfrPort), the tests pass them via runCLIWith/runCLIMergedWith, and the package variables are gone. Verified with the root package tests (x8 on Windows), golangci-lint v2.15.0 (windows and linux).
Still open (step 4): adding t.Parallel() to the root tests. Each run calls signal.Notify and TestE2ESIGTERMExits143 sends SIGTERM to the whole process, so parallel runs would interrupt each other; that test (or signal handling) needs isolating first, and other package-level state should be audited before turning parallelism on.
TMHSDigital commentedon Nov 14, 2026
Step 4 is done in d0c56f0: 58
TestE2E*tests in the root package now callt.Parallel(), which cutsgo test .from about 10.5 s to 3.6 s on Windows.Seven stay serial on purpose: the ones that call
t.Setenvoros.Chdir(they panic or race undert.Parallel), andTestE2ESIGTERMExits143. Go runs every serial top-level test before it resumes any parallel one, so that test's process-wide SIGTERM can't reach a parallel run. The other shared state I found is safe: the defaultSUBENUM_STATEfile is only written after a signal, andTestE2EResumepasses its own-state.Verified with
go test -race -shuffle=on -count=4 .on Windows and three shuffled runs of a Linux test binary under WSL, including the SIGTERM test.