Skip to content

Commit 821d37e

Browse files
authored
Merge pull request #196 from smira/fix/stop-informers
Stop informers on context cancelation
2 parents 49a0435 + 1c70934 commit 821d37e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/conformance/client/logs.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"sigs.k8s.io/hydrophone/pkg/log"
2727

2828
corev1 "k8s.io/api/core/v1"
29-
"k8s.io/apimachinery/pkg/util/wait"
3029
"k8s.io/client-go/informers"
3130
"k8s.io/client-go/tools/cache"
3231
)
@@ -48,8 +47,8 @@ func (c *Client) PrintE2ELogs(ctx context.Context) error {
4847
return fmt.Errorf("failed to add event handler: %w", err)
4948
}
5049

51-
informerFactory.Start(wait.NeverStop)
52-
informerFactory.WaitForCacheSync(wait.NeverStop)
50+
informerFactory.Start(ctx.Done())
51+
informerFactory.WaitForCacheSync(ctx.Done())
5352

5453
for {
5554
pod, _ := podInformer.Lister().Pods(c.namespace).Get(conformance.PodName)

0 commit comments

Comments
 (0)