Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Dec 5, 2024
1 parent d21caa3 commit a639570
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/api/diagnostic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func (suite *diagnosticTestSuite) SetupSuite() {
mustBootstrapCluster(re, suite.svr)
mustPutStore(re, suite.svr, 1, metapb.StoreState_Up, metapb.NodeState_Serving, nil)
mustPutStore(re, suite.svr, 2, metapb.StoreState_Up, metapb.NodeState_Serving, nil)
suite.svr.GetRaftCluster().GetCoordinator().GetPrepareChecker().SetPrepared()
}

func (suite *diagnosticTestSuite) TearDownSuite() {
Expand Down
2 changes: 2 additions & 0 deletions server/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2989,6 +2989,8 @@ func TestScanLimit(t *testing.T) {
func checkScanLimit(re *require.Assertions, regionCount int, expectScanLimit ...int) {
tc, co, cleanup := prepare(nil, nil, nil, re)
defer cleanup()
// set prepared to avoid prepare checker block the patrol
co.GetPrepareChecker().SetPrepared()
re.NoError(failpoint.Enable("github.com/tikv/pd/pkg/schedule/checker/breakPatrol", `return`))
re.NoError(failpoint.Enable("github.com/tikv/pd/pkg/schedule/checker/regionCount", fmt.Sprintf("return(\"%d\")", regionCount)))
defer func() {
Expand Down

0 comments on commit a639570

Please sign in to comment.