Merge pull request #90498 from gaurav1086/fix_logging_race_condition

Fix race condition in logging
This commit is contained in:
Kubernetes Prow Robot 2020-06-07 10:33:45 -07:00 committed by GitHub
commit 14559bc406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,14 +58,14 @@ var _ = instrumentation.SIGDescribe("Logging soak [Performance] [Slow] [Disrupti
var wg sync.WaitGroup
wg.Add(loggingSoak.Scale)
for i := 0; i < loggingSoak.Scale; i++ {
go func() {
go func(i int) {
defer wg.Done()
defer ginkgo.GinkgoRecover()
wave := fmt.Sprintf("wave%v", strconv.Itoa(i))
framework.Logf("Starting logging soak, wave = %v", wave)
RunLogPodsWithSleepOf(f, kbRateInSeconds, wave, totalLogTime)
framework.Logf("Completed logging soak, wave %v", i)
}()
}(i)
// Niceness.
time.Sleep(loggingSoak.TimeBetweenWaves)
}