No need to do an extra read

pull/1113/head
Vijay Pai 10 years ago
parent c5b397927c
commit 55bb5bdf80
  1. 10
      test/cpp/qps/client_sync.cc

@ -108,13 +108,10 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient {
if (stream_) {
SimpleResponse response;
stream_->WritesDone();
EXPECT_FALSE(stream_->Read(&response));
Status s = stream_->Finish();
EXPECT_TRUE(s.IsOk());
EXPECT_TRUE(stream_->Finish().IsOk());
}
}
void ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE {
double start = Timer::Now();
EXPECT_TRUE(stream_->Write(request_));
@ -123,7 +120,8 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient {
}
private:
grpc::ClientContext context_;
std::unique_ptr<grpc::ClientReaderWriter<SimpleRequest,SimpleResponse>> stream_;
std::unique_ptr<grpc::ClientReaderWriter<SimpleRequest,
SimpleResponse>> stream_;
};
std::unique_ptr<Client>

Loading…
Cancel
Save