Skip to content

Commit

Permalink
Fix test failure
Browse files Browse the repository at this point in the history
Signed-off-by: Bin Shi <[email protected]>

Fix go fmt error

Signed-off-by: Bin Shi <[email protected]>
  • Loading branch information
binshi-bing committed Apr 12, 2023
1 parent 93a5694 commit 37ec9f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/tso/keyspace_group_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (suite *keyspaceGroupManagerTestSuite) TestWatchAndDynamicallyApplyChanges(
// Verify the keyspace group assignment.
testutil.Eventually(re, func() bool {
idsAssigned := collectAssignedKeyspaceGroupIDs(re, mgr)
return reflect.DeepEqual(idsExpected, idsAssigned)
return reflect.DeepEqual(idsAssigned, idsExpected)
})
}

Expand Down Expand Up @@ -548,6 +548,9 @@ func addKeyspaceGroupAssignment(
}

func collectAssignedKeyspaceGroupIDs(re *require.Assertions, ksgMgr *KeyspaceGroupManager) []int {
ksgMgr.RLock()
defer ksgMgr.RUnlock()

ids := []int{}
for i := 0; i < len(ksgMgr.kgs); i++ {
ksg := ksgMgr.kgs[i]
Expand Down

0 comments on commit 37ec9f9

Please sign in to comment.