aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2016-10-13 12:00:32 -0700
committerGravatar Vijay Pai <vpai@google.com>2016-10-13 12:00:32 -0700
commit65a9ef16edfeeddb0b433bc207d25633f38884e0 (patch)
tree41381a90f8fde1961e4dd234b650a3f203f585b5 /test/cpp
parent61536a737176e5429b0b1f336e054f9743a03b91 (diff)
Fix channel/stub for dup service use
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/end2end/hybrid_end2end_test.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc
index 1ef2af2e2e..05f898144c 100644
--- a/test/cpp/end2end/hybrid_end2end_test.cc
+++ b/test/cpp/end2end/hybrid_end2end_test.cc
@@ -321,13 +321,16 @@ class HybridEnd2endTest : public ::testing::Test {
}
void SendSimpleServerStreamingToDupService() {
+ std::shared_ptr<Channel> channel =
+ CreateChannel(server_address_.str(), InsecureChannelCredentials());
+ auto stub = grpc::testing::duplicate::EchoTestService::NewStub(channel);
EchoRequest request;
EchoResponse response;
ClientContext context;
context.set_wait_for_ready(true);
request.set_message("hello");
- auto stream = stub_->ResponseStream(&context, request);
+ auto stream = stub->ResponseStream(&context, request);
EXPECT_TRUE(stream->Read(&response));
EXPECT_EQ(response.message(), request.message() + "0_dup");
EXPECT_TRUE(stream->Read(&response));