From 4ebfd0c7737b96da41e5337b1e0e33e5511fa273 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 31 Aug 2026 22:56:38 +1000 Subject: [PATCH] chore: noctx cleanup --- internal/infrastructure/cronstore/store_review_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/infrastructure/cronstore/store_review_test.go b/internal/infrastructure/cronstore/store_review_test.go index 86348c8a8..acc107e6c 100644 --- a/internal/infrastructure/cronstore/store_review_test.go +++ b/internal/infrastructure/cronstore/store_review_test.go @@ -339,6 +339,7 @@ func TestCrossProcessFlockBlocksParentWhileChildHoldsLock(t *testing.T) { } dir := t.TempDir() path := filepath.Join(dir, "jobs.json") + ctx := t.Context() // Build a tiny helper that opens the same file and holds the // flock. The helper is built once per run; the cost is paid only @@ -370,12 +371,12 @@ func main() { t.Fatalf("WriteFile helper: %v", err) } helperBin := filepath.Join(dir, "helper") - if out, err := exec.Command("go", "build", "-o", helperBin, helperSrc).CombinedOutput(); err != nil { + if out, err := exec.CommandContext(ctx, "go", "build", "-o", helperBin, helperSrc).CombinedOutput(); err != nil { t.Fatalf("go build helper: %v\n%s", err, out) } // Launch the child in the background. - child := exec.Command(helperBin, path) + child := exec.CommandContext(ctx, helperBin, path) child.Stdout = os.Stdout child.Stderr = os.Stderr if err := child.Start(); err != nil {