diff options
Diffstat (limited to 'examples/pubsub/subscriber_test.cc')
-rw-r--r-- | examples/pubsub/subscriber_test.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/pubsub/subscriber_test.cc b/examples/pubsub/subscriber_test.cc index 4ff125f4b3..2d606336ad 100644 --- a/examples/pubsub/subscriber_test.cc +++ b/examples/pubsub/subscriber_test.cc @@ -40,6 +40,7 @@ #include <grpc++/server.h> #include <grpc++/server_builder.h> #include <grpc++/server_context.h> +#include <grpc++/server_credentials.h> #include <grpc++/status.h> #include <gtest/gtest.h> @@ -104,12 +105,11 @@ class SubscriberTest : public ::testing::Test { int port = grpc_pick_unused_port_or_die(); server_address_ << "localhost:" << port; ServerBuilder builder; - builder.AddPort(server_address_.str()); + builder.AddPort(server_address_.str(), grpc::InsecureServerCredentials()); builder.RegisterService(&service_); server_ = builder.BuildAndStart(); - channel_ = - CreateChannelDeprecated(server_address_.str(), ChannelArguments()); + channel_ = CreateChannel(server_address_.str(), grpc::InsecureCredentials(), ChannelArguments()); subscriber_.reset(new grpc::examples::pubsub::Subscriber(channel_)); } |