From 2f9c16dd869950e7bcb3703cb0d33d08e5be0205 Mon Sep 17 00:00:00 2001 From: jig Date: Thu, 8 Oct 2026 00:43:27 -0600 Subject: [PATCH] Disable git auto-gc/maintenance in engine test git helpers The git helpers in boundary_test.go and phase_test.go ran plain git, so a commit could spawn a detached auto-gc/maintenance process that outlives the test and races t.TempDir cleanup on Linux CI. Pass -c gc.auto=0 -c maintenance.auto=false, matching the tests_intact_test.go fixtures since PR #33. No assertions or test behaviour changed. Co-Authored-By: Claude Opus 5.5 --- internal/engine/boundary_test.go | 2 +- internal/engine/phase_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/engine/boundary_test.go b/internal/engine/boundary_test.go index c92b4a0..4e5ad5c 100644 --- a/internal/engine/boundary_test.go +++ b/internal/engine/boundary_test.go @@ -16,7 +16,7 @@ import ( func gitIn(t *testing.T, dir string, args ...string) { t.Helper() - command := exec.Command("git", args...) + command := exec.Command("git", append([]string{"-c", "gc.auto=0", "-c", "maintenance.auto=false"}, args...)...) command.Dir = dir if output, err := command.CombinedOutput(); err != nil { t.Fatalf("git %v: %v: %s", args, err, output) diff --git a/internal/engine/phase_test.go b/internal/engine/phase_test.go index 5cc3685..717d271 100644 --- a/internal/engine/phase_test.go +++ b/internal/engine/phase_test.go @@ -29,7 +29,7 @@ func initRepo(t *testing.T) string { dir := t.TempDir() git := func(args ...string) { t.Helper() - command := exec.Command("git", args...) + command := exec.Command("git", append([]string{"-c", "gc.auto=0", "-c", "maintenance.auto=false"}, args...)...) command.Dir = dir if output, err := command.CombinedOutput(); err != nil { t.Fatalf("git %v: %v: %s", args, err, output) @@ -1571,7 +1571,7 @@ func TestTestsIntactJudgesTheChangeSinceThePinnedBase(t *testing.T) { t.Fatal(err) } for _, args := range [][]string{{"add", "src"}, {"commit", "--quiet", "-m", "tests"}} { - command := exec.Command("git", args...) + command := exec.Command("git", append([]string{"-c", "gc.auto=0", "-c", "maintenance.auto=false"}, args...)...) command.Dir = repo if output, err := command.CombinedOutput(); err != nil { t.Fatalf("git %v: %v: %s", args, err, output)