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 <tim@timvaillancourt.com>
  • Loading branch information
timvaillancourt committed Feb 10, 2025
1 parent 1985769 commit 81a2817
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 @@ -175,9 +175,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 @@ -868,6 +868,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 871 in go/vt/vtorc/logic/tablet_discovery_test.go

View workflow job for this annotation

GitHub Actions / Unit Test (Race)

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

0 comments on commit 81a2817

Please sign in to comment.