mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
volume: fix unit test flake
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
This commit is contained in:
parent
d32e9b0b69
commit
33749d0436
@ -198,6 +198,7 @@ func TestVolumePluginMultiThreaded(t *testing.T) {
|
|||||||
assert.Equal(t, int32(0), totalErrors.Load())
|
assert.Equal(t, int32(0), totalErrors.Load())
|
||||||
|
|
||||||
for i := 0; i < 100; i++ {
|
for i := 0; i < 100; i++ {
|
||||||
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
_, err := vpm.FindPluginBySpec(volumeSpec)
|
_, err := vpm.FindPluginBySpec(volumeSpec)
|
||||||
@ -205,7 +206,6 @@ func TestVolumePluginMultiThreaded(t *testing.T) {
|
|||||||
totalErrors.Add(1)
|
totalErrors.Add(1)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
wg.Add(1)
|
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user