From 29c65de359a314156b92a7b0c816bca3b652581d Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Mon, 29 Mar 2021 23:43:09 +0200 Subject: [PATCH] Ignore k8s' updateUnfinishedWorkLoop go routine in goleak tests (#8598) This go routing uses a ticker to stop. This is prompt to create false positives in tests failures. It is also unexported so let's threat that as a k8s internal. Therefore, let's ignore it in goleak. Signed-off-by: Julien Pivotto --- util/testutil/testing.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/testutil/testing.go b/util/testutil/testing.go index 8ec50cb00..31e0ee9bc 100644 --- a/util/testutil/testing.go +++ b/util/testutil/testing.go @@ -36,5 +36,9 @@ func TolerantVerifyLeak(m *testing.M) { goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), // https://github.com/kubernetes/klog/blob/c85d02d1c76a9ebafa81eb6d35c980734f2c4727/klog.go#L417 goleak.IgnoreTopFunction("k8s.io/klog/v2.(*loggingT).flushDaemon"), + // This go routine uses a ticker to stop, so it can create false + // positives. + // https://github.com/kubernetes/client-go/blob/f6ce18ae578c8cca64d14ab9687824d9e1305a67/util/workqueue/queue.go#L201 + goleak.IgnoreTopFunction("k8s.io/client-go/util/workqueue.(*Type).updateUnfinishedWorkLoop"), ) }