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
Matt T. Proud 2016-07-18 16:20:22 +02:00
parent fa174bcdaf
commit 656ea8f98f
1 changed files with 1 additions and 0 deletions

View File

@ -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: