mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #29114 from matttproud/cleanups/density_e2e
Automatic merge from submit-queue test/e2e: plug time.Ticker resource leak. This commit ensures that `logPodStartupStatus` does not leak running `time.Ticker` instances. Upon termination of the consuming routine, we stop the ticker.
This commit is contained in:
commit
cfdb468654
@ -151,6 +151,7 @@ func logPodStartupStatus(c *client.Client, expectedPods int, ns string, observed
|
||||
podStore := framework.NewPodStore(c, ns, label, fields.Everything())
|
||||
defer podStore.Stop()
|
||||
ticker := time.NewTicker(period)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
|
Loading…
Reference in New Issue
Block a user