diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 42e22688513..607df74318f 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -183,7 +183,7 @@ class ServerBuilder { : num_cqs(GPR_MAX(gpr_cpu_num_cores(), 4)), min_pollers(1), max_pollers(INT_MAX), - cq_timeout_msec(100) {} + cq_timeout_msec(1000) {} // Number of server completion queues to create to listen to incoming RPCs. int num_cqs; diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index a46f9f268bc..3618d9ac2ee 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -226,11 +226,6 @@ class End2endTest : public ::testing::TestWithParam { kMaxMessageSize_(8192), special_service_("special") { GetParam().Log(); - - sync_server_settings_.max_pollers = INT_MAX; - sync_server_settings_.min_pollers = 1; - sync_server_settings_.cq_timeout_msec = 10; - sync_server_settings_.num_cqs = 4; } void TearDown() GRPC_OVERRIDE { @@ -256,7 +251,9 @@ class End2endTest : public ::testing::TestWithParam { kMaxMessageSize_); // For testing max message size. builder.RegisterService(&dup_pkg_service_); - builder.SetSyncServerSettings(sync_server_settings_); + builder.SetSyncServerOption(ServerBuilder::SyncServerOption::NUM_CQS, 4); + builder.SetSyncServerOption( + ServerBuilder::SyncServerOption::CQ_TIMEOUT_MSEC, 10); server_ = builder.BuildAndStart(); is_server_started_ = true; @@ -287,7 +284,10 @@ class End2endTest : public ::testing::TestWithParam { ServerBuilder builder; builder.AddListeningPort(proxyaddr.str(), InsecureServerCredentials()); builder.RegisterService(proxy_service_.get()); - builder.SetSyncServerSettings(sync_server_settings_); + + builder.SetSyncServerOption(ServerBuilder::SyncServerOption::NUM_CQS, 4); + builder.SetSyncServerOption( + ServerBuilder::SyncServerOption::CQ_TIMEOUT_MSEC, 10); proxy_server_ = builder.BuildAndStart(); @@ -309,7 +309,6 @@ class End2endTest : public ::testing::TestWithParam { TestServiceImpl special_service_; TestServiceImplDupPkg dup_pkg_service_; grpc::string user_agent_prefix_; - ServerBuilder::SyncServerSettings sync_server_settings_; }; static void SendRpc(grpc::testing::EchoTestService::Stub* stub, int num_rpcs,