diff --git a/benchmark/benchmark_test.go b/benchmark/benchmark_test.go index b0c303008616..61c9fba08386 100644 --- a/benchmark/benchmark_test.go +++ b/benchmark/benchmark_test.go @@ -16,7 +16,7 @@ import ( func runUnary(b *testing.B, maxConcurrentCalls int) { s := stats.AddStats(b, 38) b.StopTimer() - target, stopper := StartServer(ServerInfo{Addr: "localhost:0", Type: "protobuf"}) + target, stopper := StartServer(ServerInfo{Addr: "localhost:0", Type: "protobuf"}, grpc.MaxConcurrentStreams(uint32(maxConcurrentCalls+1))) defer stopper() conn := NewClientConn(target, grpc.WithInsecure()) tc := testpb.NewBenchmarkServiceClient(conn) @@ -59,7 +59,7 @@ func runUnary(b *testing.B, maxConcurrentCalls int) { func runStream(b *testing.B, maxConcurrentCalls int) { s := stats.AddStats(b, 38) b.StopTimer() - target, stopper := StartServer(ServerInfo{Addr: "localhost:0", Type: "protobuf"}) + target, stopper := StartServer(ServerInfo{Addr: "localhost:0", Type: "protobuf"}, grpc.MaxConcurrentStreams(uint32(maxConcurrentCalls+1))) defer stopper() conn := NewClientConn(target, grpc.WithInsecure()) tc := testpb.NewBenchmarkServiceClient(conn)