Skip to content

Commit

Permalink
Revert "*: fix goleak in the statisticstest (#39503)"
Browse files Browse the repository at this point in the history
This reverts commit fa7cf31.
  • Loading branch information
hawkingrei authored Nov 30, 2022
1 parent fa7cf31 commit e4daa8d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/realtikvtest/statisticstest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ go_test(
deps = [
"//statistics/handle",
"//testkit",
"//testkit/testsetup",
"//tests/realtikvtest",
"@com_github_stretchr_testify//require",
"@org_uber_go_goleak//:goleak",
],
)
11 changes: 11 additions & 0 deletions tests/realtikvtest/statisticstest/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,20 @@ package statisticstest
import (
"testing"

"github.com/pingcap/tidb/testkit/testsetup"
"github.com/pingcap/tidb/tests/realtikvtest"
"go.uber.org/goleak"
)

func TestMain(m *testing.M) {
opts := []goleak.Option{
goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),
goleak.IgnoreTopFunction("github.com/lestrrat-go/httprc.runFetchWorker"),
goleak.IgnoreTopFunction("google.golang.org/grpc.(*ccBalancerWrapper).watcher"),
goleak.IgnoreTopFunction("internal/poll.runtime_pollWait"),
goleak.IgnoreTopFunction("net/http.(*persistConn).writeLoop"),
}
testsetup.SetupForCommonTest()
goleak.VerifyTestMain(m, opts...)
realtikvtest.RunTestMain(m)
}

0 comments on commit e4daa8d

Please sign in to comment.