Merge pull request #18831 from nicolasnoble/grpc_namespace_channel_arguments

Resolving ambiguous call to CreateCustomChannel.
pull/18454/head
Karthik Ravi Shankar 6 years ago committed by GitHub
commit 7d1125d96e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/cpp/client/client_channel_stress_test.cc
  2. 4
      test/cpp/end2end/async_end2end_test.cc
  3. 6
      test/cpp/end2end/channelz_service_test.cc
  4. 4
      test/cpp/end2end/client_callback_end2end_test.cc
  5. 2
      test/cpp/end2end/client_lb_end2end_test.cc
  6. 2
      test/cpp/end2end/end2end_test.cc
  7. 2
      test/cpp/end2end/grpclb_end2end_test.cc
  8. 2
      test/cpp/end2end/shutdown_test.cc
  9. 2
      test/cpp/end2end/xds_end2end_test.cc
  10. 2
      test/cpp/microbenchmarks/fullstack_fixtures.h
  11. 8
      test/cpp/util/create_test_channel.cc

@ -268,7 +268,7 @@ class ClientChannelStressTest {
std::ostringstream uri;
uri << "fake:///servername_not_used";
channel_ =
CreateCustomChannel(uri.str(), InsecureChannelCredentials(), args);
::grpc::CreateCustomChannel(uri.str(), InsecureChannelCredentials(), args);
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
}

@ -295,7 +295,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> {
GetParam().credentials_type, &args);
std::shared_ptr<Channel> channel =
!(GetParam().inproc)
? CreateCustomChannel(server_address_.str(), channel_creds, args)
? ::grpc::CreateCustomChannel(server_address_.str(), channel_creds, args)
: server_->InProcessChannel(args);
stub_ = grpc::testing::EchoTestService::NewStub(channel);
}
@ -1256,7 +1256,7 @@ TEST_P(AsyncEnd2endTest, UnimplementedRpc) {
GetParam().credentials_type, &args);
std::shared_ptr<Channel> channel =
!(GetParam().inproc)
? CreateCustomChannel(server_address_.str(), channel_creds, args)
? ::grpc::CreateCustomChannel(server_address_.str(), channel_creds, args)
: server_->InProcessChannel(args);
std::unique_ptr<grpc::testing::UnimplementedEchoService::Stub> stub;
stub = grpc::testing::UnimplementedEchoService::NewStub(channel);

@ -145,7 +145,7 @@ class ChannelzServerTest : public ::testing::Test {
ChannelArguments args;
args.SetInt(GRPC_ARG_ENABLE_CHANNELZ, 1);
args.SetInt(GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE, 1024);
std::shared_ptr<Channel> channel_to_backend = CreateCustomChannel(
std::shared_ptr<Channel> channel_to_backend = ::grpc::CreateCustomChannel(
backend_server_address, InsecureChannelCredentials(), args);
proxy_service_.AddChannelToBackend(channel_to_backend);
}
@ -157,7 +157,7 @@ class ChannelzServerTest : public ::testing::Test {
// disable channelz. We only want to focus on proxy to backend outbound.
args.SetInt(GRPC_ARG_ENABLE_CHANNELZ, 0);
std::shared_ptr<Channel> channel =
CreateCustomChannel(target, InsecureChannelCredentials(), args);
::grpc::CreateCustomChannel(target, InsecureChannelCredentials(), args);
channelz_stub_ = grpc::channelz::v1::Channelz::NewStub(channel);
echo_stub_ = grpc::testing::EchoTestService::NewStub(channel);
}
@ -171,7 +171,7 @@ class ChannelzServerTest : public ::testing::Test {
// This ensures that gRPC will not do connection sharing.
args.SetInt("salt", salt++);
std::shared_ptr<Channel> channel =
CreateCustomChannel(target, InsecureChannelCredentials(), args);
::grpc::CreateCustomChannel(target, InsecureChannelCredentials(), args);
return grpc::testing::EchoTestService::NewStub(channel);
}

@ -143,7 +143,7 @@ class ClientCallbackEnd2endTest
case Protocol::TCP:
if (!GetParam().use_interceptors) {
channel_ =
CreateCustomChannel(server_address_.str(), channel_creds, args);
::grpc::CreateCustomChannel(server_address_.str(), channel_creds, args);
} else {
channel_ = CreateCustomChannelWithInterceptors(
server_address_.str(), channel_creds, args,
@ -1094,7 +1094,7 @@ TEST_P(ClientCallbackEnd2endTest, UnimplementedRpc) {
GetParam().credentials_type, &args);
std::shared_ptr<Channel> channel =
(GetParam().protocol == Protocol::TCP)
? CreateCustomChannel(server_address_.str(), channel_creds, args)
? ::grpc::CreateCustomChannel(server_address_.str(), channel_creds, args)
: server_->InProcessChannel(args);
std::unique_ptr<grpc::testing::UnimplementedEchoService::Stub> stub;
stub = grpc::testing::UnimplementedEchoService::NewStub(channel);

@ -236,7 +236,7 @@ class ClientLbEnd2endTest : public ::testing::Test {
} // else, default to pick first
args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR,
response_generator_.get());
return CreateCustomChannel("fake:///", creds_, args);
return ::grpc::CreateCustomChannel("fake:///", creds_, args);
}
bool SendRpc(

@ -341,7 +341,7 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> {
if (!GetParam().inproc) {
if (!GetParam().use_interceptors) {
channel_ =
CreateCustomChannel(server_address_.str(), channel_creds, args);
::grpc::CreateCustomChannel(server_address_.str(), channel_creds, args);
} else {
channel_ = CreateCustomChannelWithInterceptors(
server_address_.str(), channel_creds, args,

@ -433,7 +433,7 @@ class GrpclbEnd2endTest : public ::testing::Test {
channel_creds, call_creds, nullptr)));
call_creds->Unref();
channel_creds->Unref();
channel_ = CreateCustomChannel(uri.str(), creds, args);
channel_ = ::grpc::CreateCustomChannel(uri.str(), creds, args);
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
}

@ -86,7 +86,7 @@ class ShutdownTest : public ::testing::TestWithParam<string> {
ChannelArguments args;
auto channel_creds =
GetCredentialsProvider()->GetChannelCredentials(GetParam(), &args);
channel_ = CreateCustomChannel(target, channel_creds, args);
channel_ = ::grpc::CreateCustomChannel(target, channel_creds, args);
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
}

@ -432,7 +432,7 @@ class XdsEnd2endTest : public ::testing::Test {
channel_creds, call_creds, nullptr)));
call_creds->Unref();
channel_creds->Unref();
channel_ = CreateCustomChannel(uri.str(), creds, args);
channel_ = ::grpc::CreateCustomChannel(uri.str(), creds, args);
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
}

@ -87,7 +87,7 @@ class FullstackFixture : public BaseFixture {
config.ApplyCommonChannelArguments(&args);
if (address.length() > 0) {
channel_ =
CreateCustomChannel(address, InsecureChannelCredentials(), args);
::grpc::CreateCustomChannel(address, InsecureChannelCredentials(), args);
} else {
channel_ = server_->InProcessChannel(args);
}

@ -118,7 +118,7 @@ std::shared_ptr<Channel> CreateTestChannel(
if (creds.get()) {
channel_creds = CompositeChannelCredentials(channel_creds, creds);
}
return CreateCustomChannel(server, channel_creds, channel_args);
return ::grpc::CreateCustomChannel(server, channel_creds, channel_args);
}
std::shared_ptr<Channel> CreateTestChannel(
@ -132,7 +132,7 @@ std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<ChannelCredentials> channel_creds;
if (cred_type.empty()) {
if (interceptor_creators.empty()) {
return CreateCustomChannel(server, InsecureChannelCredentials(), args);
return ::grpc::CreateCustomChannel(server, InsecureChannelCredentials(), args);
} else {
return experimental::CreateCustomChannelWithInterceptors(
server, InsecureChannelCredentials(), args,
@ -159,7 +159,7 @@ std::shared_ptr<Channel> CreateTestChannel(
channel_creds = CompositeChannelCredentials(channel_creds, creds);
}
if (interceptor_creators.empty()) {
return CreateCustomChannel(connect_to, channel_creds, channel_args);
return ::grpc::CreateCustomChannel(connect_to, channel_creds, channel_args);
} else {
return experimental::CreateCustomChannelWithInterceptors(
connect_to, channel_creds, channel_args,
@ -171,7 +171,7 @@ std::shared_ptr<Channel> CreateTestChannel(
GPR_ASSERT(channel_creds != nullptr);
if (interceptor_creators.empty()) {
return CreateCustomChannel(server, channel_creds, args);
return ::grpc::CreateCustomChannel(server, channel_creds, args);
} else {
return experimental::CreateCustomChannelWithInterceptors(
server, channel_creds, args, std::move(interceptor_creators));

Loading…
Cancel
Save