From a1d00facbcfcd3a47d5617fd65f6ff5842c15649 Mon Sep 17 00:00:00 2001
From: Craig Tiller <ctiller@google.com>
Date: Wed, 10 May 2017 15:43:44 -0700
Subject: [PATCH] Finish pumped streams: should alleviate infinite hang

---
 .../microbenchmarks/bm_fullstack_streaming_pump.cc    | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/test/cpp/microbenchmarks/bm_fullstack_streaming_pump.cc b/test/cpp/microbenchmarks/bm_fullstack_streaming_pump.cc
index 47705d3031..01ff39121e 100644
--- a/test/cpp/microbenchmarks/bm_fullstack_streaming_pump.cc
+++ b/test/cpp/microbenchmarks/bm_fullstack_streaming_pump.cc
@@ -105,6 +105,17 @@ static void BM_PumpStreamClientToServer(benchmark::State& state) {
       GPR_ASSERT(need_tags & (1 << i));
       need_tags &= ~(1 << i);
     }
+    response_rw.Finish(Status::OK, tag(0));
+    Status final_status;
+    request_rw->Finish(&final_status, tag(1));
+    need_tags = (1 << 0) | (1 << 1);
+    while (need_tags) {
+      GPR_ASSERT(fixture->cq()->Next(&t, &ok));
+      int i = (int)(intptr_t)t;
+      GPR_ASSERT(need_tags & (1 << i));
+      need_tags &= ~(1 << i);
+    }
+    GPR_ASSERT(final_status.ok());
   }
   fixture->Finish(state);
   fixture.reset();
-- 
GitLab