Skip to content

Commit

Permalink
move sort to test
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed Feb 10, 2025
1 parent 4a7128c commit 041170d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions go/vt/vtorc/logic/tablet_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,6 @@ func getAllTablets(ctx context.Context, cells []string) (tabletsByCell map[strin
})
}
_ = eg.Wait() // always nil
if len(failedCells) > 1 {
slices.Sort(failedCells)
}
return tabletsByCell, failedCells
}

Expand Down
1 change: 1 addition & 0 deletions go/vt/vtorc/logic/tablet_discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,7 @@ func TestGetAllTablets(t *testing.T) {
// confirm zone1 + zone2 succeeded and zone3 + zone4 failed
tabletsByCell, failedCells := getAllTablets(ctx, []string{"zone1", "zone2", "zone3", "zone4"})
require.Len(t, tabletsByCell, 2)
slices.Sort(failedCells)

Check failure on line 893 in go/vt/vtorc/logic/tablet_discovery_test.go

View workflow job for this annotation

GitHub Actions / Unit Test (Race)

undefined: slices

Check failure on line 893 in go/vt/vtorc/logic/tablet_discovery_test.go

View workflow job for this annotation

GitHub Actions / Code Coverage

undefined: slices
require.Equal(t, []string{"zone3", "zone4"}, failedCells)
for _, tablets := range tabletsByCell {
require.Len(t, tablets, 1)
Expand Down

0 comments on commit 041170d

Please sign in to comment.