From 33749d0436b3b3590c90dba785a6dee957f561f9 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Tue, 15 Oct 2024 11:56:49 +0200 Subject: [PATCH] volume: fix unit test flake Signed-off-by: Dr. Stefan Schimanski --- pkg/volume/plugins_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/volume/plugins_test.go b/pkg/volume/plugins_test.go index b3d03737a20..84881dae430 100644 --- a/pkg/volume/plugins_test.go +++ b/pkg/volume/plugins_test.go @@ -198,6 +198,7 @@ func TestVolumePluginMultiThreaded(t *testing.T) { assert.Equal(t, int32(0), totalErrors.Load()) for i := 0; i < 100; i++ { + wg.Add(1) go func() { defer wg.Done() _, err := vpm.FindPluginBySpec(volumeSpec) @@ -205,7 +206,6 @@ func TestVolumePluginMultiThreaded(t *testing.T) { totalErrors.Add(1) } }() - wg.Add(1) } wg.Wait()