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 3, 2024
1 parent 1c28cbd commit 69886b1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/mcs/scheduling/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (s *Server) updateAPIServerMemberLoop() {
}
if s.cluster.SwitchAPIServerLeader(pdpb.NewPDClient(cc)) {
if status.Leader != curLeader {
log.Info("switch leader", zap.String("leader-id", fmt.Sprintf("%x", ep.ID)), zap.String("endpoint", ep.ClientURLs[0]))
log.Info("switch leader", zap.String("current-leader", fmt.Sprintf("%x", curLeader)), zap.String("new-leader-id", fmt.Sprintf("%x", ep.ID)), zap.String("endpoint", ep.ClientURLs[0]))
}
curLeader = ep.ID
break
Expand Down
7 changes: 0 additions & 7 deletions tests/integrations/mcs/scheduling/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ func (suite *serverTestSuite) TestStoreLimit() {
defer tc.Destroy()
leaderServer := suite.pdLeader.GetServer()
tc.WaitForPrimaryServing(re)
waitSwitchFinish(re, leaderServer, constant.SchedulingServiceName)
oc := tc.GetPrimaryServer().GetCluster().GetCoordinator().GetOperatorController()

conf := leaderServer.GetReplicationConfig().Clone()
Expand Down Expand Up @@ -613,12 +612,6 @@ func waitSyncFinish(re *require.Assertions, tc *tests.TestSchedulingCluster, typ
})
}

func waitSwitchFinish(re *require.Assertions, server *server.Server, serviceName string) {
testutil.Eventually(re, func() bool {
return server.IsServiceIndependent(serviceName)
})
}

type multipleServerTestSuite struct {
suite.Suite
ctx context.Context
Expand Down

0 comments on commit 69886b1

Please sign in to comment.