diff --git a/src/net/rpc/server_test.go b/src/net/rpc/server_test.go index cf171ac4fb..d04271d99c 100644 --- a/src/net/rpc/server_test.go +++ b/src/net/rpc/server_test.go @@ -657,6 +657,9 @@ func benchmarkEndToEnd(dial func() (*Client, error), b *testing.B) { } func benchmarkEndToEndAsync(dial func() (*Client, error), b *testing.B) { + if b.N == 0 { + return + } const MaxConcurrentCalls = 100 once.Do(startServer) client, err := dial()