From 2456c5cff04bb867e220f084bc88034f588c8aa8 Mon Sep 17 00:00:00 2001 From: apolcyn Date: Thu, 25 Mar 2021 20:56:46 -0700 Subject: [PATCH] Allow using interop client for making Traffic Director RPCs (#4291) --- interop/client/client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/interop/client/client.go b/interop/client/client.go index 8854ed2d76ec..b827f574b8cb 100644 --- a/interop/client/client.go +++ b/interop/client/client.go @@ -34,6 +34,7 @@ import ( "google.golang.org/grpc/interop" "google.golang.org/grpc/resolver" "google.golang.org/grpc/testdata" + _ "google.golang.org/grpc/xds/googledirectpath" testgrpc "google.golang.org/grpc/interop/grpc_testing" ) @@ -126,7 +127,10 @@ func main() { } resolver.SetDefaultScheme("dns") - serverAddr := net.JoinHostPort(*serverHost, strconv.Itoa(*serverPort)) + serverAddr := *serverHost + if *serverPort != 0 { + serverAddr = net.JoinHostPort(*serverHost, strconv.Itoa(*serverPort)) + } var opts []grpc.DialOption switch credsChosen { case credsTLS: