mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #128085 from sttts/sttts-volume-flake
volume: fix TestVolumePluginMultiThreaded unit test flake
This commit is contained in:
commit
9b56413d56
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user