aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/pubsub/publisher_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pubsub/publisher_test.cc')
-rw-r--r--examples/pubsub/publisher_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/pubsub/publisher_test.cc b/examples/pubsub/publisher_test.cc
index c988b4802e..f9b6bb3418 100644
--- a/examples/pubsub/publisher_test.cc
+++ b/examples/pubsub/publisher_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>
@@ -106,12 +107,11 @@ class PublisherTest : 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());
publisher_.reset(new grpc::examples::pubsub::Publisher(channel_));
}