Add repro for coalescing bug

pull/11557/head
ncteisen 8 years ago
parent 9bee3086c3
commit be7b82ba5e
  1. 23
      test/cpp/end2end/end2end_test.cc

@ -772,6 +772,29 @@ TEST_P(End2endTest, ResponseStreamWithCoalescingApi) {
EXPECT_TRUE(s.ok()); EXPECT_TRUE(s.ok());
} }
// This was added to prevent regression from issue:
// https://github.com/grpc/grpc/issues/11546
TEST_P(End2endTest, ResponseStreamWithEverythingCoalesced) {
ResetStub();
EchoRequest request;
EchoResponse response;
ClientContext context;
request.set_message("hello");
context.AddMetadata(kServerUseCoalescingApi, "1");
// We will only send one message, forcing everything (init metadata, message,
// trailing) to be coalesced together.
context.AddMetadata(kServerResponseStreamsToSend, "1");
auto stream = stub_->ResponseStream(&context, request);
EXPECT_TRUE(stream->Read(&response));
EXPECT_EQ(response.message(), request.message() + "0");
EXPECT_FALSE(stream->Read(&response));
Status s = stream->Finish();
EXPECT_TRUE(s.ok());
}
TEST_P(End2endTest, BidiStream) { TEST_P(End2endTest, BidiStream) {
ResetStub(); ResetStub();
EchoRequest request; EchoRequest request;

Loading…
Cancel
Save