diff --git a/tests/integrations/mcs/scheduling/server_test.go b/tests/integrations/mcs/scheduling/server_test.go index cb036e8b042..fc07436b92f 100644 --- a/tests/integrations/mcs/scheduling/server_test.go +++ b/tests/integrations/mcs/scheduling/server_test.go @@ -500,6 +500,9 @@ func (suite *serverTestSuite) TestStoreLimit() { defer tc.Destroy() leaderServer := suite.pdLeader.GetServer() tc.WaitForPrimaryServing(re) + testutil.Eventually(re, func() bool { + return leaderServer.GetRaftCluster().IsServiceIndependent(constant.SchedulingServiceName) + }) oc := tc.GetPrimaryServer().GetCluster().GetCoordinator().GetOperatorController() conf := leaderServer.GetReplicationConfig().Clone()