From e0a6883fa027f11f34e0f74a44228dd3bc726e97 Mon Sep 17 00:00:00 2001 From: Andrew Gouin Date: Fri, 6 Dec 2024 10:33:55 -0700 Subject: [PATCH] fix test race --- gturbine/gtshred/processor_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gturbine/gtshred/processor_test.go b/gturbine/gtshred/processor_test.go index ab1af1d..e793d52 100644 --- a/gturbine/gtshred/processor_test.go +++ b/gturbine/gtshred/processor_test.go @@ -48,6 +48,8 @@ func TestProcessorMemoryCleanup(t *testing.T) { time.Sleep(cleanupInterval * 4) // Verify completed block was cleaned up + p.completedBlocksMu.RLock() + defer p.completedBlocksMu.RUnlock() if _, exists := p.completedBlocks[string(group.BlockHash)]; exists { t.Error("completed block should have been cleaned up") }