mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #104697 from MikeSpreitzer/fix-104692
X race condition from TestApfExecuteWatchRequestsWithInitializationSignal
This commit is contained in:
commit
a1d089f372
@ -476,9 +476,7 @@ func TestApfExecuteWatchRequestsWithInitializationSignal(t *testing.T) {
|
|||||||
|
|
||||||
onExecuteFunc := func() {
|
onExecuteFunc := func() {
|
||||||
firstRunning.Done()
|
firstRunning.Done()
|
||||||
firstRunning.Wait()
|
|
||||||
|
|
||||||
sendSignals()
|
|
||||||
fakeFilter.wait()
|
fakeFilter.wait()
|
||||||
|
|
||||||
allRunning.Done()
|
allRunning.Done()
|
||||||
@ -502,9 +500,10 @@ func TestApfExecuteWatchRequestsWithInitializationSignal(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
firstRunning.Wait()
|
firstRunning.Wait()
|
||||||
|
sendSignals()
|
||||||
fakeFilter.wait()
|
fakeFilter.wait()
|
||||||
|
|
||||||
firstRunning.Add(concurrentRequests)
|
firstRunning.Add(concurrentRequests)
|
||||||
|
|
||||||
for i := 0; i < concurrentRequests; i++ {
|
for i := 0; i < concurrentRequests; i++ {
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
@ -513,6 +512,8 @@ func TestApfExecuteWatchRequestsWithInitializationSignal(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
firstRunning.Wait()
|
||||||
|
sendSignals()
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user