From 018bf1a8649e5036dba04343db6e4cd668eb3e24 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 29 Apr 2016 13:39:17 -0700 Subject: [PATCH] modified has_async_methods and has_sync_methods of TestServerBuilderPlugin --- test/cpp/end2end/server_builder_plugin_test.cc | 14 ++++++++++++-- 1 file 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 e42bd10832e..bebf1d1979e 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; }