File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ package main
2
2
3
3
import (
4
4
"context"
5
- "go.uber.org/goleak"
6
5
"net"
7
6
"os"
8
7
"sync"
9
8
"testing"
10
9
"time"
10
+
11
+ "go.uber.org/goleak"
11
12
)
12
13
13
14
func TestMain (m * testing.M ) {
@@ -48,8 +49,10 @@ func TestLeaks(t *testing.T) {
48
49
goleak .IgnoreTopFunction ("github.com/panjf2000/ants/v2.(*Pool).purgeStaleWorkers" ),
49
50
goleak .IgnoreTopFunction ("github.com/panjf2000/ants/v2.(*Pool).ticktock" ),
50
51
// ignore the pprof http server goroutine
51
- goleak .IgnoreTopFunction ("internal/poll.runtime_pollWait" ))
52
-
52
+ goleak .IgnoreTopFunction ("internal/poll.runtime_pollWait" ),
53
+ // ignore the glog flush daemon goroutine
54
+ goleak .IgnoreAnyFunction ("github.com/golang/glog.(*fileSink).flushDaemon" ),
55
+ )
53
56
}
54
57
55
58
// hasRedis does a TCP connect to port 6379 to see if there is a redis server running on localhost.
You can’t perform that action at this time.
0 commit comments