diff --git a/tests/server/member/member_test.go b/tests/server/member/member_test.go index 6d4cbb3a6a4..7aadc2772e8 100644 --- a/tests/server/member/member_test.go +++ b/tests/server/member/member_test.go @@ -32,6 +32,7 @@ import ( "github.com/tikv/pd/pkg/utils/assertutil" "github.com/tikv/pd/pkg/utils/etcdutil" "github.com/tikv/pd/pkg/utils/testutil" + "github.com/tikv/pd/pkg/utils/typeutil" "github.com/tikv/pd/server" "github.com/tikv/pd/server/config" "github.com/tikv/pd/tests" @@ -151,7 +152,9 @@ func TestLeaderPriority(t *testing.T) { re := require.New(t) ctx, cancel := context.WithCancel(context.Background()) defer cancel() - cluster, err := tests.NewTestCluster(ctx, 3) + cluster, err := tests.NewTestCluster(ctx, 3, func(conf *config.Config, serverName string) { + conf.LeaderPriorityCheckInterval = typeutil.NewDuration(time.Second) + }) defer cluster.Destroy() re.NoError(err)