mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #90498 from gaurav1086/fix_logging_race_condition
Fix race condition in logging
This commit is contained in:
commit
14559bc406
@ -58,14 +58,14 @@ var _ = instrumentation.SIGDescribe("Logging soak [Performance] [Slow] [Disrupti
|
|||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
wg.Add(loggingSoak.Scale)
|
wg.Add(loggingSoak.Scale)
|
||||||
for i := 0; i < loggingSoak.Scale; i++ {
|
for i := 0; i < loggingSoak.Scale; i++ {
|
||||||
go func() {
|
go func(i int) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
defer ginkgo.GinkgoRecover()
|
defer ginkgo.GinkgoRecover()
|
||||||
wave := fmt.Sprintf("wave%v", strconv.Itoa(i))
|
wave := fmt.Sprintf("wave%v", strconv.Itoa(i))
|
||||||
framework.Logf("Starting logging soak, wave = %v", wave)
|
framework.Logf("Starting logging soak, wave = %v", wave)
|
||||||
RunLogPodsWithSleepOf(f, kbRateInSeconds, wave, totalLogTime)
|
RunLogPodsWithSleepOf(f, kbRateInSeconds, wave, totalLogTime)
|
||||||
framework.Logf("Completed logging soak, wave %v", i)
|
framework.Logf("Completed logging soak, wave %v", i)
|
||||||
}()
|
}(i)
|
||||||
// Niceness.
|
// Niceness.
|
||||||
time.Sleep(loggingSoak.TimeBetweenWaves)
|
time.Sleep(loggingSoak.TimeBetweenWaves)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user