Skip to content
Snippets Groups Projects
Commit 55bb5bdf authored by Vijay Pai's avatar Vijay Pai
Browse files

No need to do an extra read

parent c5b39792
No related branches found
No related tags found
No related merge requests found
...@@ -108,13 +108,10 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { ...@@ -108,13 +108,10 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient {
if (stream_) { if (stream_) {
SimpleResponse response; SimpleResponse response;
stream_->WritesDone(); stream_->WritesDone();
EXPECT_FALSE(stream_->Read(&response)); EXPECT_TRUE(stream_->Finish().IsOk());
Status s = stream_->Finish();
EXPECT_TRUE(s.IsOk());
} }
} }
void ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { void ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE {
double start = Timer::Now(); double start = Timer::Now();
EXPECT_TRUE(stream_->Write(request_)); EXPECT_TRUE(stream_->Write(request_));
...@@ -123,7 +120,8 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { ...@@ -123,7 +120,8 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient {
} }
private: private:
grpc::ClientContext context_; grpc::ClientContext context_;
std::unique_ptr<grpc::ClientReaderWriter<SimpleRequest,SimpleResponse>> stream_; std::unique_ptr<grpc::ClientReaderWriter<SimpleRequest,
SimpleResponse>> stream_;
}; };
std::unique_ptr<Client> std::unique_ptr<Client>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment