aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2015-05-05 11:42:54 -0700
committerGravatar Vijay Pai <vpai@google.com>2015-05-05 11:42:54 -0700
commitdfe83deb2c91c710ae51435689372eb67b641061 (patch)
treea21db495c58ba29389152d4f6e07456be82654c7 /test
parent0a4129399aa765dffdbbff81641939e6083fc373 (diff)
Make sure that we have enough server threads to actually support the
number of outstanding streams
Diffstat (limited to 'test')
-rw-r--r--test/cpp/qps/qps_driver.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc
index 93b1247d73..fc8e04201c 100644
--- a/test/cpp/qps/qps_driver.cc
+++ b/test/cpp/qps/qps_driver.cc
@@ -94,6 +94,15 @@ int main(int argc, char** argv) {
server_config.set_threads(FLAGS_server_threads);
server_config.set_enable_ssl(FLAGS_enable_ssl);
+ // If we're running a sync-server streaming test, make sure
+ // that we have at least as many threads as the active streams
+ // or else threads will be blocked from forward progress and the
+ // client will deadlock on a timer.
+ GPR_ASSERT(!(server_type == grpc::testing::SYNCHRONOUS_SERVER &&
+ rpc_type == grpc::testing::STREAMING &&
+ FLAGS_server_threads < FLAGS_client_channels *
+ FLAGS_outstanding_rpcs_per_channel));
+
auto result = RunScenario(client_config, FLAGS_num_clients,
server_config, FLAGS_num_servers,
FLAGS_warmup_seconds, FLAGS_benchmark_seconds,