Skip to content

Commit

Permalink
tests/member: change leader priority check ticker to reduce test time (
Browse files Browse the repository at this point in the history
…#8001)

ref #7969

Signed-off-by: husharp <[email protected]>
  • Loading branch information
HuSharp authored Mar 29, 2024
1 parent 87db551 commit a44b208
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/server/member/member_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit a44b208

Please sign in to comment.