From 3ac317192775cbe36dec30b89d51fa94a488beff Mon Sep 17 00:00:00 2001 From: "pulse-triage[bot]" <249995291+pulse-triage[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2026 09:41:55 +0100 Subject: [PATCH] test(server): synchronize remaining startup watchdog log capture TestStartupWatchdogFiresAndNamesLastPhase and TestStartupWatchdogStopIsIdempotentAndPreventsFire still poll a plain bytes.Buffer while the watchdog goroutine writes it through zerolog, so 'go test -race' reports the same read/write data race that 4d2ee8666c fixed only in service_health_test.go. Reuse the package-level syncBuffer so the poll and the watchdog write are serialized; drop the now-unused bytes import. Change-source: pulse-maintainer --- pkg/server/startup_watchdog_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/server/startup_watchdog_test.go b/pkg/server/startup_watchdog_test.go index cc05141a0d..612d0ff688 100644 --- a/pkg/server/startup_watchdog_test.go +++ b/pkg/server/startup_watchdog_test.go @@ -1,7 +1,6 @@ package server import ( - "bytes" "strings" "testing" "time" @@ -27,7 +26,7 @@ func TestStartupPhaseMarkAndCurrent(t *testing.T) { } func TestStartupWatchdogFiresAndNamesLastPhase(t *testing.T) { - var buf bytes.Buffer + var buf syncBuffer logger := zerolog.New(&buf) phase := &startupPhase{} @@ -54,7 +53,7 @@ func TestStartupWatchdogFiresAndNamesLastPhase(t *testing.T) { } func TestStartupWatchdogStopIsIdempotentAndPreventsFire(t *testing.T) { - var buf bytes.Buffer + var buf syncBuffer logger := zerolog.New(&buf) stop := startStartupWatchdog(logger, &startupPhase{}, 15*time.Millisecond)