mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
test(azure::cache): deflake TestCacheNoConcurrentGet
Signed-off-by: knight42 <anonymousknight96@gmail.com>
This commit is contained in:
parent
3cdfdfccc9
commit
90ddd5f721
@ -195,8 +195,10 @@ func TestCacheNoConcurrentGet(t *testing.T) {
|
|||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
for i := 0; i < 5; i++ {
|
for i := 0; i < 5; i++ {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go cache.Get(key, CacheReadTypeDefault)
|
go func() {
|
||||||
wg.Done()
|
defer wg.Done()
|
||||||
|
_, _ = cache.Get(key, CacheReadTypeDefault)
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
v, err := cache.Get(key, CacheReadTypeDefault)
|
v, err := cache.Get(key, CacheReadTypeDefault)
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
Loading…
Reference in New Issue
Block a user