diff --git a/.bazelrc b/.bazelrc index 2a1b030700ec2..d622cdfe057ed 100644 --- a/.bazelrc +++ b/.bazelrc @@ -5,7 +5,6 @@ build --java_language_version=17 build --java_runtime_version=17 build --tool_java_language_version=17 build --tool_java_runtime_version=17 -build --experimental_remote_cache_compression run --color=yes build:release --workspace_status_command=./build/print-workspace-status.sh --stamp diff --git a/distsql/BUILD.bazel b/distsql/BUILD.bazel index 9f20df059fe06..822a49dd79e39 100644 --- a/distsql/BUILD.bazel +++ b/distsql/BUILD.bazel @@ -53,6 +53,7 @@ go_library( go_test( name = "distsql_test", + timeout = "short", srcs = [ "bench_test.go", "distsql_test.go", diff --git a/domain/db_test.go b/domain/db_test.go index 25b24d8116604..cdd02c949404c 100644 --- a/domain/db_test.go +++ b/domain/db_test.go @@ -76,8 +76,7 @@ func TestNormalSessionPool(t *testing.T) { info, err1 := infosync.GlobalInfoSyncerInit(context.Background(), "t", func() uint64 { return 1 }, nil, true) require.NoError(t, err1) conf := config.GetGlobalConfig() - conf.Port = 0 - conf.Status.StatusPort = 10045 + conf.Socket = "" svr, err := server.NewServer(conf, nil) require.NoError(t, err) svr.SetDomain(domain) @@ -109,8 +108,7 @@ func TestAbnormalSessionPool(t *testing.T) { info, err1 := infosync.GlobalInfoSyncerInit(context.Background(), "t", func() uint64 { return 1 }, nil, true) require.NoError(t, err1) conf := config.GetGlobalConfig() - conf.Port = 0 - conf.Status.StatusPort = 10046 + conf.Socket = "" svr, err := server.NewServer(conf, nil) require.NoError(t, err) svr.SetDomain(domain) diff --git a/domain/infosync/BUILD.bazel b/domain/infosync/BUILD.bazel index e9ecff7fa5606..c92426d835c2f 100644 --- a/domain/infosync/BUILD.bazel +++ b/domain/infosync/BUILD.bazel @@ -47,6 +47,7 @@ go_library( go_test( name = "infosync_test", + timeout = "short", srcs = ["info_test.go"], embed = [":infosync"], flaky = True, diff --git a/domain/main_test.go b/domain/main_test.go index fc4bc11227206..163fedbad111a 100644 --- a/domain/main_test.go +++ b/domain/main_test.go @@ -17,11 +17,13 @@ package domain_test import ( "testing" + "github.com/pingcap/tidb/server" "github.com/pingcap/tidb/testkit/testsetup" "go.uber.org/goleak" ) func TestMain(m *testing.M) { + server.RunInGoTest = true testsetup.SetupForCommonTest() opts := []goleak.Option{ goleak.IgnoreTopFunction("github.com/golang/glog.(*loggingT).flushDaemon"),