From f4f9e7d344b188d45a134863dcdae611aa6d38b6 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Thu, 11 Apr 2024 16:24:19 +0800 Subject: [PATCH] fix TestKeyspaceGroupMergeIntoDefault Signed-off-by: Ryan Leung --- tests/integrations/mcs/tso/keyspace_group_manager_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/integrations/mcs/tso/keyspace_group_manager_test.go b/tests/integrations/mcs/tso/keyspace_group_manager_test.go index af33b85b1a1..f678e901419 100644 --- a/tests/integrations/mcs/tso/keyspace_group_manager_test.go +++ b/tests/integrations/mcs/tso/keyspace_group_manager_test.go @@ -793,9 +793,11 @@ func (suite *tsoKeyspaceGroupManagerTestSuite) TestKeyspaceGroupMergeIntoDefault // Check if the first keyspace group is served. svr := suite.tsoCluster.WaitForDefaultPrimaryServing(re) re.NotNil(svr) - // Check if the last keyspace group is served. - svr = suite.tsoCluster.WaitForPrimaryServing(re, uint32(keyspaceGroupNum), uint32(keyspaceGroupNum)) - re.NotNil(svr) + for i := 1; i < keyspaceGroupNum; i++ { + // Check if the keyspace group is served. + svr = suite.tsoCluster.WaitForPrimaryServing(re, uint32(i), uint32(i)) + re.NotNil(svr) + } // Merge all the keyspace groups into the default keyspace group. handlersutil.MustMergeKeyspaceGroup(re, suite.pdLeaderServer, mcsutils.DefaultKeyspaceGroupID, &handlers.MergeKeyspaceGroupsParams{ MergeAllIntoDefault: true,