add MaxConcurrentStreams to benchmark_test when start the server (#1271)
diff --git a/benchmark/benchmark_test.go b/benchmark/benchmark_test.go
index b0c3030..61c9fba 100644
--- a/benchmark/benchmark_test.go
+++ b/benchmark/benchmark_test.go
@@ -16,7 +16,7 @@
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 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)