aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/end2end/server_builder_plugin_test.cc
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2016-04-29 13:39:17 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2016-04-29 13:39:17 -0700
commit018bf1a8649e5036dba04343db6e4cd668eb3e24 (patch)
tree9441137936f1f2246f8b3c35c31c977cefd214a4 /test/cpp/end2end/server_builder_plugin_test.cc
parenta42ec2134117f4a4db994467edcff52e6f347f3d (diff)
modified has_async_methods and has_sync_methods of TestServerBuilderPlugin
Diffstat (limited to 'test/cpp/end2end/server_builder_plugin_test.cc')
-rw-r--r--test/cpp/end2end/server_builder_plugin_test.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc
index e42bd10832..bebf1d1979 100644
--- a/test/cpp/end2end/server_builder_plugin_test.cc
+++ b/test/cpp/end2end/server_builder_plugin_test.cc
@@ -78,9 +78,19 @@ class TestServerBuilderPlugin : public ServerBuilderPlugin {
change_arguments_is_called_ = true;
}
- bool has_async_methods() const GRPC_OVERRIDE { return register_service_; }
+ bool has_async_methods() const GRPC_OVERRIDE {
+ if (register_service_) {
+ return service_->has_async_methods();
+ }
+ return false;
+ }
- bool has_sync_methods() const GRPC_OVERRIDE { return register_service_; }
+ bool has_sync_methods() const GRPC_OVERRIDE {
+ if (register_service_) {
+ return service_->has_synchronous_methods();
+ }
+ return false;
+ }
void SetRegisterService() { register_service_ = true; }