Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
Signed-off-by: bufferflies <[email protected]>
  • Loading branch information
bufferflies committed Dec 23, 2024
1 parent 461b86a commit 7a5ea34
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/integrations/mcs/scheduling/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (suite *serverTestSuite) TestAllocIDAfterLeaderChange() {
re := suite.Require()
re.NoError(failpoint.Enable("github.com/tikv/pd/pkg/mcs/scheduling/server/fastUpdateMember", `return(true)`))
pd2, err := suite.cluster.Join(suite.ctx)
re.NoError(err)
re.NoError(err, "error: %v", err)
err = pd2.Run()
re.NotEmpty(suite.cluster.WaitLeader())
re.NoError(err)
Expand Down Expand Up @@ -261,6 +261,12 @@ func (suite *serverTestSuite) TestDisableSchedulingServiceFallback() {

// API server will execute scheduling jobs since there is no scheduling server.
testutil.Eventually(re, func() bool {
if suite.pdLeader.GetServer() == nil {
println("server is nil")
}
if suite.pdLeader.GetServer().GetRaftCluster() == nil {
println("raft cluster is nil")
}
return suite.pdLeader.GetServer().GetRaftCluster().IsSchedulingControllerRunning()
})
leaderServer := suite.pdLeader.GetServer()
Expand Down

0 comments on commit 7a5ea34

Please sign in to comment.