|
|
|
@ -136,7 +136,7 @@ class AsyncEnd2endTest : public ::testing::Test { |
|
|
|
|
|
|
|
|
|
send_request.set_message("Hello"); |
|
|
|
|
std::unique_ptr<ClientAsyncResponseReader<EchoResponse> > |
|
|
|
|
response_reader(stub_->Echo( |
|
|
|
|
response_reader(stub_->AsyncEcho( |
|
|
|
|
&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
|
|
|
|
|
service_.RequestEcho( |
|
|
|
@ -191,7 +191,7 @@ TEST_F(AsyncEnd2endTest, SimpleClientStreaming) { |
|
|
|
|
|
|
|
|
|
send_request.set_message("Hello"); |
|
|
|
|
std::unique_ptr<ClientAsyncWriter<EchoRequest> > cli_stream( |
|
|
|
|
stub_->RequestStream(&cli_ctx, &recv_response, &cli_cq_, tag(1))); |
|
|
|
|
stub_->AsyncRequestStream(&cli_ctx, &recv_response, &cli_cq_, tag(1))); |
|
|
|
|
|
|
|
|
|
service_.RequestRequestStream( |
|
|
|
|
&srv_ctx, &srv_stream, &srv_cq_, tag(2)); |
|
|
|
@ -245,7 +245,7 @@ TEST_F(AsyncEnd2endTest, SimpleServerStreaming) { |
|
|
|
|
|
|
|
|
|
send_request.set_message("Hello"); |
|
|
|
|
std::unique_ptr<ClientAsyncReader<EchoResponse> > cli_stream( |
|
|
|
|
stub_->ResponseStream(&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
stub_->AsyncResponseStream(&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
|
|
|
|
|
service_.RequestResponseStream( |
|
|
|
|
&srv_ctx, &recv_request, &srv_stream, &srv_cq_, tag(2)); |
|
|
|
@ -296,7 +296,7 @@ TEST_F(AsyncEnd2endTest, SimpleBidiStreaming) { |
|
|
|
|
|
|
|
|
|
send_request.set_message("Hello"); |
|
|
|
|
std::unique_ptr<ClientAsyncReaderWriter<EchoRequest, EchoResponse> > |
|
|
|
|
cli_stream(stub_->BidiStream(&cli_ctx, &cli_cq_, tag(1))); |
|
|
|
|
cli_stream(stub_->AsyncBidiStream(&cli_ctx, &cli_cq_, tag(1))); |
|
|
|
|
|
|
|
|
|
service_.RequestBidiStream( |
|
|
|
|
&srv_ctx, &srv_stream, &srv_cq_, tag(2)); |
|
|
|
@ -355,7 +355,7 @@ TEST_F(AsyncEnd2endTest, ClientInitialMetadataRpc) { |
|
|
|
|
cli_ctx.AddMetadata(meta2.first, meta2.second); |
|
|
|
|
|
|
|
|
|
std::unique_ptr<ClientAsyncResponseReader<EchoResponse> > response_reader( |
|
|
|
|
stub_->Echo(&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
stub_->AsyncEcho(&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
|
|
|
|
|
service_.RequestEcho( |
|
|
|
|
&srv_ctx, &recv_request, &response_writer, &srv_cq_, tag(2)); |
|
|
|
@ -397,7 +397,7 @@ TEST_F(AsyncEnd2endTest, ServerInitialMetadataRpc) { |
|
|
|
|
std::pair<grpc::string, grpc::string> meta2("key2", "val2"); |
|
|
|
|
|
|
|
|
|
std::unique_ptr<ClientAsyncResponseReader<EchoResponse> > response_reader( |
|
|
|
|
stub_->Echo(&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
stub_->AsyncEcho(&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
|
|
|
|
|
service_.RequestEcho( |
|
|
|
|
&srv_ctx, &recv_request, &response_writer, &srv_cq_, tag(2)); |
|
|
|
@ -445,7 +445,7 @@ TEST_F(AsyncEnd2endTest, ServerTrailingMetadataRpc) { |
|
|
|
|
std::pair<grpc::string, grpc::string> meta2("key2", "val2"); |
|
|
|
|
|
|
|
|
|
std::unique_ptr<ClientAsyncResponseReader<EchoResponse> > response_reader( |
|
|
|
|
stub_->Echo(&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
stub_->AsyncEcho(&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
|
|
|
|
|
service_.RequestEcho( |
|
|
|
|
&srv_ctx, &recv_request, &response_writer, &srv_cq_, tag(2)); |
|
|
|
@ -501,7 +501,7 @@ TEST_F(AsyncEnd2endTest, MetadataRpc) { |
|
|
|
|
cli_ctx.AddMetadata(meta2.first, meta2.second); |
|
|
|
|
|
|
|
|
|
std::unique_ptr<ClientAsyncResponseReader<EchoResponse> > response_reader( |
|
|
|
|
stub_->Echo(&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
stub_->AsyncEcho(&cli_ctx, send_request, &cli_cq_, tag(1))); |
|
|
|
|
|
|
|
|
|
service_.RequestEcho( |
|
|
|
|
&srv_ctx, &recv_request, &response_writer, &srv_cq_, tag(2)); |
|
|
|
|