Skip to content

Commit

Permalink
patch test
Browse files Browse the repository at this point in the history
  • Loading branch information
rboyer committed May 10, 2023
1 parent 4bca6fe commit 6ff3936
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion agent/grpc-internal/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ func TestNewDialer_WithALPNWrapper(t *testing.T) {
Addr: lis1.Addr(),
UseTLS: true,
})
builder.AddServer(types.AreaLAN, &metadata.Server{
Name: "server-1",
ID: "ID1",
Datacenter: "dc1",
Addr: lis1.Addr(),
UseTLS: true,
})
builder.AddServer(types.AreaWAN, &metadata.Server{
Name: "server-2",
ID: "ID2",
Expand Down Expand Up @@ -389,8 +396,13 @@ func TestClientConnPool_IntegrationWithGRPCResolver_Rebalance(t *testing.T) {
for i := 0; i < count; i++ {
name := fmt.Sprintf("server-%d", i)
srv := newSimpleTestServer(t, name, "dc1", nil)
res.AddServer(types.AreaWAN, srv.Metadata())
res.AddServer(types.AreaLAN, srv.Metadata())
t.Cleanup(srv.shutdown)
// Put a duplicate instance of this on the WAN that will
// fail if we accidentally use it.
srvBad := newPanicTestServer(t, hclog.Default(), name, "dc1", nil)
res.AddServer(types.AreaWAN, srvBad.Metadata())
t.Cleanup(srvBad.shutdown)
}

conn, err := pool.ClientConn("dc1")
Expand Down

0 comments on commit 6ff3936

Please sign in to comment.