Skip to content
Snippets Groups Projects
Commit aae6c2cb authored by Craig Tiller's avatar Craig Tiller
Browse files

Fix server plugin test

parent 8ad69bfa
No related branches found
No related tags found
No related merge requests found
...@@ -155,7 +155,7 @@ std::unique_ptr<Server> ServerBuilder::BuildAndStart() { ...@@ -155,7 +155,7 @@ std::unique_ptr<Server> ServerBuilder::BuildAndStart() {
if (num_frequently_polled_cqs == 0) { if (num_frequently_polled_cqs == 0) {
gpr_log(GPR_ERROR, gpr_log(GPR_ERROR,
"Atleast one of the completion queues must be frequently polled"); "At least one of the completion queues must be frequently polled");
return nullptr; return nullptr;
} }
......
...@@ -189,6 +189,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> { ...@@ -189,6 +189,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
void StartServer() { void StartServer() {
grpc::string server_address = "localhost:" + to_string(port_); grpc::string server_address = "localhost:" + to_string(port_);
builder_->AddListeningPort(server_address, InsecureServerCredentials()); builder_->AddListeningPort(server_address, InsecureServerCredentials());
cq_ = builder_->AddCompletionQueue();
server_ = builder_->BuildAndStart(); server_ = builder_->BuildAndStart();
EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr);
} }
...@@ -219,6 +220,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> { ...@@ -219,6 +220,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
std::unique_ptr<ServerBuilder> builder_; std::unique_ptr<ServerBuilder> builder_;
std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_; std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_;
std::unique_ptr<Server> server_; std::unique_ptr<Server> server_;
std::unique_ptr<ServerCompletionQueue> cq_;
TestServiceImpl service_; TestServiceImpl service_;
int port_; int port_;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment