diff --git a/privilege/privileges/main_test.go b/privilege/privileges/main_test.go index 652fff0ffc8fd..d530daf09bd56 100644 --- a/privilege/privileges/main_test.go +++ b/privilege/privileges/main_test.go @@ -27,6 +27,8 @@ func TestMain(m *testing.M) { goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"), goleak.IgnoreTopFunction("go.etcd.io/etcd/client/pkg/v3/logutil.(*MergeLogger).outputLoop"), goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreTopFunction("net/http.(*persistConn).writeLoop"), + goleak.IgnoreTopFunction("internal/poll.runtime_pollWait"), } testbridge.SetupForCommonTest() diff --git a/server/stat_test.go b/server/stat_test.go index 88fc2e0081a43..66c974a3deeea 100644 --- a/server/stat_test.go +++ b/server/stat_test.go @@ -52,6 +52,8 @@ func TestUptime(t *testing.T) { tidbdrv := NewTiDBDriver(store) cfg := newTestConfig() cfg.Socket = "" + cfg.Port = 0 + cfg.Status.StatusPort = 0 server, err := NewServer(cfg, tidbdrv) require.NoError(t, err)