From 5ba8773126640ba1e35592a6b31f84c3724bd61e Mon Sep 17 00:00:00 2001 From: Sean Sullivan Date: Wed, 26 Jun 2024 10:14:51 -0700 Subject: [PATCH] Ignore reported goroutine leak during SPDY shutdown --- test/integration/framework/etcd.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/integration/framework/etcd.go b/test/integration/framework/etcd.go index 1a9ad950c99..48aae9f28dc 100644 --- a/test/integration/framework/etcd.go +++ b/test/integration/framework/etcd.go @@ -207,6 +207,14 @@ func EtcdMain(tests func() int) { // Both names occurred in practice. goleak.IgnoreTopFunction("k8s.io/kubernetes/vendor/gopkg.in/natefinch/lumberjack%2ev2.(*Logger).millRun"), goleak.IgnoreTopFunction("gopkg.in/natefinch/lumberjack%2ev2.(*Logger).millRun"), + // If there is an error during connection shutdown, SPDY keeps a + // goroutine around for ten minutes, which gets reported as a leak + // (the goroutine is cleaned up after the ten minutes). + // + // https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/moby/spdystream/connection.go#L732-L744 + // + // Ignore this reported leak. + goleak.IgnoreTopFunction("github.com/moby/spdystream.(*Connection).shutdown"), ) stop, err := startEtcd(nil)