Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <nolouch@gmail.com>
  • Loading branch information
nolouch committed Aug 2, 2023
1 parent 8a164ea commit 5364c39
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/integrations/mcs/tso/keyspace_group_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (suite *tsoKeyspaceGroupManagerTestSuite) TestTSOKeyspaceGroupSplit() {
// Get a TSO from the keyspace group 1.
var ts *pdpb.Timestamp
testutil.Eventually(re, func() bool {
resp, err := request(re, ctx, suite.tsoClient, 1, suite.pdLeaderServer.GetClusterID(), 222, 1)
resp, err := request(ctx, re, suite.tsoClient, 1, suite.pdLeaderServer.GetClusterID(), 222, 1)
ts = resp.GetTimestamp()
return err == nil && tsoutil.CompareTimestamp(ts, &pdpb.Timestamp{}) > 0
})
Expand All @@ -124,16 +124,17 @@ func (suite *tsoKeyspaceGroupManagerTestSuite) TestTSOKeyspaceGroupSplit() {
// Check the split TSO from keyspace group 2.
var splitTS *pdpb.Timestamp
testutil.Eventually(re, func() bool {
resp, err := request(re, ctx, suite.tsoClient, 1, suite.pdLeaderServer.GetClusterID(), 222, 2)
resp, err := request(ctx, re, suite.tsoClient, 1, suite.pdLeaderServer.GetClusterID(), 222, 2)
splitTS = resp.GetTimestamp()
return err == nil && tsoutil.CompareTimestamp(splitTS, &pdpb.Timestamp{}) > 0
})
re.Greater(tsoutil.CompareTimestamp(splitTS, ts), 0)
}

func request(
ctx context.Context,
re *require.Assertions,
ctx context.Context, client tsopb.TSOClient, count uint32,
client tsopb.TSOClient, count uint32,
clusterID uint64, keyspaceID, keyspaceGroupID uint32,
) (ts *tsopb.TsoResponse, err error) {
req := &tsopb.TsoRequest{
Expand Down

0 comments on commit 5364c39

Please sign in to comment.