Skip to content

Commit

Permalink
Fix a typo
Browse files Browse the repository at this point in the history
Signed-off-by: JmPotato <[email protected]>
  • Loading branch information
JmPotato committed Apr 14, 2023
1 parent cb96d96 commit f1bb028
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/tso/keyspace_group_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ func (suite *keyspaceGroupManagerTestSuite) newKeyspaceGroupManager(
// runTestLoadMultipleKeyspaceGroupsAssignment tests the loading of multiple keyspace group assignment.
func (suite *keyspaceGroupManagerTestSuite) runTestLoadKeyspaceGroupsAssignment(
re *require.Assertions,
numberOfKeypaceGroupsToAdd int,
numberOfKeyspaceGroupsToAdd int,
loadKeyspaceGroupsBatchSize int64, // set to 0 to use the default value
probabilityAssignToMe int, // percentage of assigning keyspace groups to this host/pod
) {
Expand All @@ -558,14 +558,14 @@ func (suite *keyspaceGroupManagerTestSuite) runTestLoadKeyspaceGroupsAssignment(
step := 30
mux := sync.Mutex{}
wg := sync.WaitGroup{}
for i := 0; i < numberOfKeypaceGroupsToAdd; i += step {
for i := 0; i < numberOfKeyspaceGroupsToAdd; i += step {
wg.Add(1)
go func(startID int) {
defer wg.Done()

endID := startID + step
if endID > numberOfKeypaceGroupsToAdd {
endID = numberOfKeypaceGroupsToAdd
if endID > numberOfKeyspaceGroupsToAdd {
endID = numberOfKeyspaceGroupsToAdd
}

randomGen := rand.New(rand.NewSource(time.Now().UnixNano()))
Expand Down Expand Up @@ -593,7 +593,7 @@ func (suite *keyspaceGroupManagerTestSuite) runTestLoadKeyspaceGroupsAssignment(
re.NoError(err)

// If no keyspace group is assigned to this host/pod, the default keyspace group should be initialized.
if numberOfKeypaceGroupsToAdd <= 0 {
if numberOfKeyspaceGroupsToAdd <= 0 {
expectedGroupIDs = append(expectedGroupIDs, mcsutils.DefaultKeyspaceGroupID)
}

Expand Down

0 comments on commit f1bb028

Please sign in to comment.