SimultaneousReadWritesDone test was not observing the contract on the

streaming API. In particular, Finish should not be called until the client
is sure that there is no more message to be read (as documented in
the comments for ClientStreamingInterface::Finish)
pull/5421/head
Vijay Pai 9 years ago
parent f7806b766b
commit bdfec2c86c
  1. 2
      test/cpp/end2end/end2end_test.cc

@ -904,9 +904,9 @@ TEST_P(End2endTest, SimultaneousReadWritesDone) {
std::thread reader_thread(ReaderThreadFunc, stream.get(), &ev);
gpr_event_wait(&ev, gpr_inf_future(GPR_CLOCK_REALTIME));
stream->WritesDone();
reader_thread.join();
Status s = stream->Finish();
EXPECT_TRUE(s.ok());
reader_thread.join();
}
TEST_P(End2endTest, ChannelState) {

Loading…
Cancel
Save