mirror of https://github.com/k3s-io/k3s
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.pull/6/head
parent
fa174bcdaf
commit
656ea8f98f
|
@ -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