Skip to content

Commit

Permalink
add a couple tests
Browse files Browse the repository at this point in the history
  • Loading branch information
demmer committed Jul 8, 2024
1 parent f5522fc commit 308d7c8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions go/vt/vtgate/balancer/balancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,22 @@ func TestBalancedPick(t *testing.T) {

[]string{"a", "b", "c", "d"},
},
{
"one target same cell",
[]*discovery.TabletHealth{
createTestTablet("a"),
},

[]string{"a"},
},
{
"one target other cell",
[]*discovery.TabletHealth{
createTestTablet("a"),
},

[]string{"b", "c", "d"},
},
}

target := &querypb.Target{Keyspace: "k", Shard: "s", TabletType: topodatapb.TabletType_REPLICA}
Expand Down

0 comments on commit 308d7c8

Please sign in to comment.