Rename enum

pull/18909/head
yang-g 6 years ago
parent de57783beb
commit ec6e7fd941
  1. 2
      include/grpcpp/server_builder_impl.h
  2. 4
      src/cpp/server/external_connection_acceptor_impl.cc
  3. 6
      test/cpp/end2end/port_sharing_end2end_test.cc

@ -272,7 +272,7 @@ class ServerBuilder {
grpc::experimental::CallbackGenericService* service);
enum class ExternalConnectionType {
CONNECTION_FROM_FD = 0 // in the form of a file descriptor
FROM_FD = 0 // in the form of a file descriptor
};
/// Register an acceptor to handle the externally accepted connection in

@ -46,8 +46,8 @@ ExternalConnectionAcceptorImpl::ExternalConnectionAcceptorImpl(
ServerBuilder::experimental_type::ExternalConnectionType type,
std::shared_ptr<ServerCredentials> creds)
: name_(name), creds_(std::move(creds)) {
GPR_ASSERT(type == ServerBuilder::experimental_type::ExternalConnectionType::
CONNECTION_FROM_FD);
GPR_ASSERT(type ==
ServerBuilder::experimental_type::ExternalConnectionType::FROM_FD);
}
std::unique_ptr<experimental::ExternalConnectionAcceptor>

@ -223,13 +223,11 @@ class PortSharingEnd2endTest : public ::testing::TestWithParam<TestScenario> {
auto server_creds = GetCredentialsProvider()->GetServerCredentials(
GetParam().credentials_type);
auto acceptor1 = builder.experimental().AddExternalConnectionAcceptor(
ServerBuilder::experimental_type::ExternalConnectionType::
CONNECTION_FROM_FD,
ServerBuilder::experimental_type::ExternalConnectionType::FROM_FD,
server_creds);
tcp_server1_.SetAcceptor(std::move(acceptor1));
auto acceptor2 = builder.experimental().AddExternalConnectionAcceptor(
ServerBuilder::experimental_type::ExternalConnectionType::
CONNECTION_FROM_FD,
ServerBuilder::experimental_type::ExternalConnectionType::FROM_FD,
server_creds);
tcp_server2_.SetAcceptor(std::move(acceptor2));
builder.RegisterService(&service_);

Loading…
Cancel
Save