diff --git a/cmd/xtcp2/treatments_embedded.go b/cmd/xtcp2/treatments_embedded.go index 8e9b31901..50a63de9b 100644 --- a/cmd/xtcp2/treatments_embedded.go +++ b/cmd/xtcp2/treatments_embedded.go @@ -37,5 +37,11 @@ func startEmbeddedTreatmentAgent(ctx context.Context, path, location string) (*t var wg sync.WaitGroup wg.Add(1) go func() { defer wg.Done(); a.Run(ctx) }() - return &treatmentFeeder{stamp: a.Stamp, wake: a.Wake}, func() { wg.Wait(); a.Close() }, nil + stop := func() { + wg.Wait() + if err := a.Close(); err != nil { + log.Printf("treatment agent: close: %v", err) + } + } + return &treatmentFeeder{stamp: a.Stamp, wake: a.Wake}, stop, nil } diff --git a/nix/tests/tcp-controller/quality.nix b/nix/tests/tcp-controller/quality.nix index 946f5995f..67b339c6e 100644 --- a/nix/tests/tcp-controller/quality.nix +++ b/nix/tests/tcp-controller/quality.nix @@ -53,7 +53,9 @@ let # These fixtures must execute, never silently skip in the focused checks. grep -q -- '--- PASS: TestPostgresConcurrentReviewFencesReplicas' "$out/tests.log" grep -q -- '--- PASS: TestClickHouseAnalysisCounterDeltas' "$out/tests.log" - go test -tags treatment -ldflags=-checklinkname=0 ${if race then "-race -count=3" else "-count=1 -cover"} \ + go test -tags treatment -ldflags=-checklinkname=0 ${ + if race then "-race -count=3" else "-count=1 -cover" + } \ -timeout 5m -v -run '^TestTreatment' ./internal/goip/actuate > "$out/routes.log" 2>&1 \ || { cat "$out/routes.log"; exit 1; } ${if race then "" else coverageTable}