Skip to content

Commit

Permalink
mcs: make TestDefaultKeyspaceGroup stable (#7437)
Browse files Browse the repository at this point in the history
close #7374

Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
rleungx and ti-chi-bot[bot] authored Nov 24, 2023
1 parent 2109a0f commit 4e9240a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/integrations/mcs/keyspace/tso_keyspace_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,10 @@ func (suite *keyspaceGroupTestSuite) TestDefaultKeyspaceGroup() {
return code == http.StatusOK && kg != nil
}, testutil.WithWaitFor(time.Second*1))
suite.Equal(utils.DefaultKeyspaceGroupID, kg.ID)
suite.Len(kg.Members, utils.DefaultKeyspaceGroupReplicaCount)
// the allocNodesToAllKeyspaceGroups loop will run every 100ms.
testutil.Eventually(suite.Require(), func() bool {
return len(kg.Members) == utils.DefaultKeyspaceGroupReplicaCount
})
for _, member := range kg.Members {
suite.Contains(nodes, member.Address)
}
Expand Down

0 comments on commit 4e9240a

Please sign in to comment.