Skip to content

interop: let the interop client set the universe domain based on a flag #8201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions interop/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/resolver"
"google.golang.org/grpc/testdata"
"google.golang.org/grpc/xds/googledirectpath" // Register xDS resolver required for c2p directpath.

_ "google.golang.org/grpc/balancer/grpclb" // Register the grpclb load balancing policy.
_ "google.golang.org/grpc/balancer/rls" // Register the RLS load balancing policy.
_ "google.golang.org/grpc/xds/googledirectpath" // Register xDS resolver required for c2p directpath.
_ "google.golang.org/grpc/balancer/grpclb" // Register the grpclb load balancing policy.
_ "google.golang.org/grpc/balancer/rls" // Register the RLS load balancing policy.

testgrpc "google.golang.org/grpc/interop/grpc_testing"
)
Expand Down Expand Up @@ -82,6 +82,7 @@ var (
soakResponseSize = flag.Int("soak_response_size", 314159, "The response size in a soak RPC. The default value is set based on the interop large unary test case.")
soakNumThreads = flag.Int("soak_num_threads", 1, "The number of threads for concurrent execution of the soak tests (rpc_soak or channel_soak). The default value is set based on the interop large unary test case.")
tlsServerName = flag.String("server_host_override", "", "The server name used to verify the hostname returned by TLS handshake if it is not empty. Otherwise, --server_host is used.")
universeDomain = flag.String("universe_domain", "", "The universe domain in which the process is running. If blank, the process is assumed to be running in the default universe.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: s/blank/empty/

additionalMetadata = flag.String("additional_metadata", "", "Additional metadata to send in each request, as a semicolon-separated list of key:value pairs.")
testCase = flag.String("test_case", "large_unary",
`Configure different test cases. Valid options are:
Expand Down Expand Up @@ -201,6 +202,9 @@ func main() {
}

resolver.SetDefaultScheme("dns")
if *universeDomain != "" {
googledirectpath.SetUniverseDomain(*universeDomain)
}
serverAddr := *serverHost
if *serverPort != 0 {
serverAddr = net.JoinHostPort(*serverHost, strconv.Itoa(*serverPort))
Expand Down