Skip to content

Commit

Permalink
Minor changes from self review
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord committed Feb 20, 2025
1 parent ca229ff commit 26055a5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions go/vt/discovery/tablet_picker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ func TestPickNonLaggingTablets(t *testing.T) {
require.NoError(t, err)
ctx, cancel := context.WithTimeout(ctx, contextTimeout)
defer cancel()

var pickedPrimary, pickedLaggingReplica, pickedNonLaggingReplica int
for i := 0; i < numTestIterations; i++ {
tablet, err := tp.PickForStreaming(ctx)
Expand All @@ -734,9 +735,9 @@ func TestPickNonLaggingTablets(t *testing.T) {
pickedNonLaggingReplica++
}
}
assert.Zero(t, pickedPrimary)
assert.Zero(t, pickedLaggingReplica)
assert.Equal(t, numTestIterations, pickedNonLaggingReplica)
require.Zero(t, pickedPrimary)
require.Zero(t, pickedLaggingReplica)
require.Equal(t, numTestIterations, pickedNonLaggingReplica)
}

type pickerTestEnv struct {
Expand Down

0 comments on commit 26055a5

Please sign in to comment.