Skip to content

Commit 9b56413

Browse files
authored
Merge pull request kubernetes#128085 from sttts/sttts-volume-flake
volume: fix TestVolumePluginMultiThreaded unit test flake
2 parents 9872b17 + 33749d0 commit 9b56413

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/volume/plugins_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,14 @@ func TestVolumePluginMultiThreaded(t *testing.T) {
198198
assert.Equal(t, int32(0), totalErrors.Load())
199199

200200
for i := 0; i < 100; i++ {
201+
wg.Add(1)
201202
go func() {
202203
defer wg.Done()
203204
_, err := vpm.FindPluginBySpec(volumeSpec)
204205
if err != nil {
205206
totalErrors.Add(1)
206207
}
207208
}()
208-
wg.Add(1)
209209
}
210210
wg.Wait()
211211

0 commit comments

Comments
 (0)