diff --git a/cmd/cluster/main_test.go b/cmd/cluster/main_test.go index cbed48d..5155dbf 100644 --- a/cmd/cluster/main_test.go +++ b/cmd/cluster/main_test.go @@ -2,12 +2,13 @@ package main import ( "context" - "go.uber.org/goleak" "net" "os" "sync" "testing" "time" + + "go.uber.org/goleak" ) func TestMain(m *testing.M) { @@ -48,8 +49,11 @@ func TestLeaks(t *testing.T) { goleak.IgnoreTopFunction("github.com/panjf2000/ants/v2.(*Pool).purgeStaleWorkers"), goleak.IgnoreTopFunction("github.com/panjf2000/ants/v2.(*Pool).ticktock"), // ignore the pprof http server goroutine - goleak.IgnoreTopFunction("internal/poll.runtime_pollWait")) + goleak.IgnoreTopFunction("internal/poll.runtime_pollWait"), + // ignore the glog flush daemon goroutine + goleak.IgnoreTopFunction("github.com/golang/glog.(*fileSink).flushDaemon"), + ) } // hasRedis does a TCP connect to port 6379 to see if there is a redis server running on localhost.