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