Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
aae6c2cb
Commit
aae6c2cb
authored
8 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Fix server plugin test
parent
8ad69bfa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cpp/server/server_builder.cc
+1
-1
1 addition, 1 deletion
src/cpp/server/server_builder.cc
test/cpp/end2end/server_builder_plugin_test.cc
+2
-0
2 additions, 0 deletions
test/cpp/end2end/server_builder_plugin_test.cc
with
3 additions
and
1 deletion
src/cpp/server/server_builder.cc
+
1
−
1
View file @
aae6c2cb
...
@@ -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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
test/cpp/end2end/server_builder_plugin_test.cc
+
2
−
0
View file @
aae6c2cb
...
@@ -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_
;
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment