From 7401293787469fb287b0d1a2ef591487c4fd8441 Mon Sep 17 00:00:00 2001 From: husharp Date: Fri, 29 Mar 2024 15:02:06 +0800 Subject: [PATCH] fix test Signed-off-by: husharp --- tests/server/member/member_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)