diff --git a/benchmark/benchmark.go b/benchmark/benchmark.go index 5a9c733d..5bb87ea0 100644 --- a/benchmark/benchmark.go +++ b/benchmark/benchmark.go @@ -192,9 +192,6 @@ func DoGenericStreamingRoundTrip(stream testpb.BenchmarkService_StreamingCallCli // NewClientConn creates a gRPC client connection to addr. func NewClientConn(addr string, opts ...grpc.DialOption) *grpc.ClientConn { - if len(opts) <= 0 { - opts = append(opts, grpc.WithInsecure()) - } conn, err := grpc.Dial(addr, opts...) if err != nil { grpclog.Fatalf("NewClientConn(%q) failed to create a ClientConn %v", addr, err) diff --git a/benchmark/benchmark_test.go b/benchmark/benchmark_test.go index 65e97ad7..ccf0f457 100644 --- a/benchmark/benchmark_test.go +++ b/benchmark/benchmark_test.go @@ -18,7 +18,7 @@ func runUnary(b *testing.B, maxConcurrentCalls int) { b.StopTimer() target, stopper := StartServer("localhost:0") defer stopper() - conn := NewClientConn(target) + conn := NewClientConn(target, grpc.WithInsecure()) tc := testpb.NewBenchmarkServiceClient(conn) // Warm up connection. @@ -61,7 +61,7 @@ func runStream(b *testing.B, maxConcurrentCalls int) { b.StopTimer() target, stopper := StartServer("localhost:0") defer stopper() - conn := NewClientConn(target) + conn := NewClientConn(target, grpc.WithInsecure()) tc := testpb.NewBenchmarkServiceClient(conn) // Warm up connection.