Fix more grpc namespace issues

pull/18371/head
Karthik Ravi Shankar 6 years ago
parent 92bde3922f
commit 8dbaa13f52
  1. 8
      include/grpcpp/server.h
  2. 2
      src/cpp/server/health/default_health_check_service.h
  3. 4
      src/cpp/server/server_cc.cc
  4. 2
      test/cpp/end2end/health_service_end2end_test.cc

@ -41,10 +41,6 @@
struct grpc_server;
namespace grpc_impl {
class HealthCheckServiceInterface;
}
namespace grpc {
class AsyncGenericService;
@ -98,7 +94,7 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
grpc_server* c_server();
/// Returns the health check service.
grpc_impl::HealthCheckServiceInterface* GetHealthCheckService() const {
HealthCheckServiceInterface* GetHealthCheckService() const {
return health_check_service_.get();
}
@ -327,7 +323,7 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
std::unique_ptr<ServerInitializer> server_initializer_;
std::unique_ptr<grpc_impl::HealthCheckServiceInterface> health_check_service_;
std::unique_ptr<HealthCheckServiceInterface> health_check_service_;
bool health_check_service_disabled_;
// When appropriate, use a default callback generic service to handle

@ -37,7 +37,7 @@ namespace grpc {
// Default implementation of HealthCheckServiceInterface. Server will create and
// own it.
class DefaultHealthCheckService final : public grpc_impl::HealthCheckServiceInterface {
class DefaultHealthCheckService final : public HealthCheckServiceInterface {
public:
enum ServingStatus { NOT_FOUND, SERVING, NOT_SERVING };

@ -802,7 +802,7 @@ Server::Server(
if (channel_args.args[i].value.pointer.p == nullptr) {
health_check_service_disabled_ = true;
} else {
health_check_service_.reset(static_cast<grpc_impl::HealthCheckServiceInterface*>(
health_check_service_.reset(static_cast<HealthCheckServiceInterface*>(
channel_args.args[i].value.pointer.p));
}
break;
@ -987,7 +987,7 @@ void Server::Start(ServerCompletionQueue** cqs, size_t num_cqs) {
DefaultHealthCheckService::HealthCheckServiceImpl*
default_health_check_service_impl = nullptr;
if (health_check_service_ == nullptr && !health_check_service_disabled_ &&
grpc_impl::DefaultHealthCheckServiceEnabled()) {
DefaultHealthCheckServiceEnabled()) {
auto* default_hc_service = new DefaultHealthCheckService;
health_check_service_.reset(default_hc_service);
// We create a non-polling CQ to avoid impacting application

@ -323,7 +323,7 @@ TEST_F(HealthServiceEnd2endTest, ExplicitlyDisableViaOverride) {
EXPECT_TRUE(DefaultHealthCheckServiceEnabled());
std::unique_ptr<HealthCheckServiceInterface> empty_service;
SetUpServer(true, false, true, std::move(empty_service));
grpc_impl::HealthCheckServiceInterface* service = server_->GetHealthCheckService();
HealthCheckServiceInterface* service = server_->GetHealthCheckService();
EXPECT_TRUE(service == nullptr);
ResetStubs();

Loading…
Cancel
Save