From 8910ce708d329648d08a0b0cde7f5af9865ef4f9 Mon Sep 17 00:00:00 2001 From: Dylan Myers Date: Thu, 30 Jul 2026 09:30:28 -0400 Subject: [PATCH] chore(tests): drop unnecessary sleep in count tracker test (PIPE-986) Assisted-by: Claude Opus 4.8 --- generator/count/tracker_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/generator/count/tracker_test.go b/generator/count/tracker_test.go index 20ba18a..9ed4936 100644 --- a/generator/count/tracker_test.go +++ b/generator/count/tracker_test.go @@ -125,9 +125,9 @@ func TestReset_UnblocksResumeC(t *testing.T) { default: } - // Reset in a goroutine + // Reset from a goroutine. The "not closed yet" check above already ran, so there + // is no need to delay before resetting. go func() { - time.Sleep(10 * time.Millisecond) tracker.Reset() }() @@ -257,7 +257,9 @@ func TestReset_ConcurrentWithAcquire(t *testing.T) { } }() - // Goroutine that resets periodically + // Goroutine that resets periodically. The 1ms spacing is intentional: it spreads + // the resets so they interleave with the concurrent Acquire calls, which is the + // concurrency this test exercises. It is not a wait-for-state sleep. wg.Add(1) go func() { defer wg.Done()