Skip to content

Commit 14559bc

Browse files
authored
Merge pull request kubernetes#90498 from gaurav1086/fix_logging_race_condition
Fix race condition in logging
2 parents 22de8fc + 93fa760 commit 14559bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/e2e/instrumentation/logging/generic_soak.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ var _ = instrumentation.SIGDescribe("Logging soak [Performance] [Slow] [Disrupti
5858
var wg sync.WaitGroup
5959
wg.Add(loggingSoak.Scale)
6060
for i := 0; i < loggingSoak.Scale; i++ {
61-
go func() {
61+
go func(i int) {
6262
defer wg.Done()
6363
defer ginkgo.GinkgoRecover()
6464
wave := fmt.Sprintf("wave%v", strconv.Itoa(i))
6565
framework.Logf("Starting logging soak, wave = %v", wave)
6666
RunLogPodsWithSleepOf(f, kbRateInSeconds, wave, totalLogTime)
6767
framework.Logf("Completed logging soak, wave %v", i)
68-
}()
68+
}(i)
6969
// Niceness.
7070
time.Sleep(loggingSoak.TimeBetweenWaves)
7171
}

0 commit comments

Comments
 (0)