diff options
-rw-r--r-- | examples/pubsub/publisher_test.cc | 3 | ||||
-rw-r--r-- | examples/pubsub/subscriber_test.cc | 3 | ||||
-rw-r--r-- | include/grpc++/create_channel.h | 6 | ||||
-rw-r--r-- | src/cpp/client/create_channel.cc | 4 | ||||
-rw-r--r-- | test/cpp/end2end/async_end2end_test.cc | 2 | ||||
-rw-r--r-- | test/cpp/end2end/end2end_test.cc | 4 | ||||
-rw-r--r-- | test/cpp/util/create_test_channel.cc | 2 |
7 files changed, 14 insertions, 10 deletions
diff --git a/examples/pubsub/publisher_test.cc b/examples/pubsub/publisher_test.cc index b7bea5b1bd..4539557a35 100644 --- a/examples/pubsub/publisher_test.cc +++ b/examples/pubsub/publisher_test.cc @@ -110,7 +110,8 @@ class PublisherTest : public ::testing::Test { builder.RegisterService(&service_); server_ = builder.BuildAndStart(); - channel_ = CreateChannel(server_address_.str(), ChannelArguments()); + channel_ = + CreateChannelDeprecated(server_address_.str(), ChannelArguments()); publisher_.reset(new grpc::examples::pubsub::Publisher(channel_)); } diff --git a/examples/pubsub/subscriber_test.cc b/examples/pubsub/subscriber_test.cc index 1fdcc8f755..c634aa4f82 100644 --- a/examples/pubsub/subscriber_test.cc +++ b/examples/pubsub/subscriber_test.cc @@ -109,7 +109,8 @@ class SubscriberTest : public ::testing::Test { builder.RegisterService(&service_); server_ = builder.BuildAndStart(); - channel_ = CreateChannel(server_address_.str(), ChannelArguments()); + channel_ = + CreateChannelDeprecated(server_address_.str(), ChannelArguments()); subscriber_.reset(new grpc::examples::pubsub::Subscriber(channel_)); } diff --git a/include/grpc++/create_channel.h b/include/grpc++/create_channel.h index eadabda359..80ca0c4dc4 100644 --- a/include/grpc++/create_channel.h +++ b/include/grpc++/create_channel.h @@ -43,8 +43,10 @@ namespace grpc { class ChannelArguments; class ChannelInterface; -std::shared_ptr<ChannelInterface> CreateChannel(const grpc::string& target, - const ChannelArguments& args); +// Deprecation warning: This function will soon be deleted +// (See pull request #711) +std::shared_ptr<ChannelInterface> CreateChannelDeprecated( + const grpc::string& target, const ChannelArguments& args); // If creds does not hold an object or is invalid, a lame channel is returned. std::shared_ptr<ChannelInterface> CreateChannel( diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc index acf51cb90b..583e072799 100644 --- a/src/cpp/client/create_channel.cc +++ b/src/cpp/client/create_channel.cc @@ -40,8 +40,8 @@ namespace grpc { class ChannelArguments; -std::shared_ptr<ChannelInterface> CreateChannel(const grpc::string &target, - const ChannelArguments &args) { +std::shared_ptr<ChannelInterface> CreateChannelDeprecated( + const grpc::string &target, const ChannelArguments &args) { return std::shared_ptr<ChannelInterface>(new Channel(target, args)); } diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 248e054e49..c36ff42949 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -105,7 +105,7 @@ class AsyncEnd2endTest : public ::testing::Test { void ResetStub() { std::shared_ptr<ChannelInterface> channel = - CreateChannel(server_address_.str(), ChannelArguments()); + CreateChannelDeprecated(server_address_.str(), ChannelArguments()); stub_.reset(grpc::cpp::test::util::TestService::NewStub(channel)); } diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index d4ca3ef49e..df370d493c 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -161,7 +161,7 @@ class End2endTest : public ::testing::Test { void ResetStub() { std::shared_ptr<ChannelInterface> channel = - CreateChannel(server_address_.str(), ChannelArguments()); + CreateChannelDeprecated(server_address_.str(), ChannelArguments()); stub_.reset(grpc::cpp::test::util::TestService::NewStub(channel)); } @@ -382,7 +382,7 @@ TEST_F(End2endTest, BidiStream) { // The two stubs are created on the same channel. TEST_F(End2endTest, DiffPackageServices) { std::shared_ptr<ChannelInterface> channel = - CreateChannel(server_address_.str(), ChannelArguments()); + CreateChannelDeprecated(server_address_.str(), ChannelArguments()); EchoRequest request; EchoResponse response; diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc index b0472d32a9..cf93589af5 100644 --- a/test/cpp/util/create_test_channel.cc +++ b/test/cpp/util/create_test_channel.cc @@ -79,7 +79,7 @@ std::shared_ptr<ChannelInterface> CreateTestChannel( } return CreateChannel(connect_to, channel_creds, channel_args); } else { - return CreateChannel(server, channel_args); + return CreateChannelDeprecated(server, channel_args); } } |