From f6e14b79891cdb30b12fb696587017ff845184d8 Mon Sep 17 00:00:00 2001
From: Alexander Polcyn <apolcyn@google.com>
Date: Thu, 13 Oct 2016 13:43:18 -0700
Subject: [PATCH] fix write buffer ruby test

---
 src/ruby/spec/generic/active_call_spec.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/ruby/spec/generic/active_call_spec.rb b/src/ruby/spec/generic/active_call_spec.rb
index 48bc61e494..5ae4f25537 100644
--- a/src/ruby/spec/generic/active_call_spec.rb
+++ b/src/ruby/spec/generic/active_call_spec.rb
@@ -137,6 +137,8 @@ describe GRPC::ActiveCall do
         msg = 'message is a string'
         client_call.write_flag = f
         client_call.remote_send(msg)
+        # flush the message in case writes are set to buffered
+        call.run_batch(CallOps::SEND_CLOSE_FROM_CLIENT => nil) if f == 1
 
         # confirm that the message was marshalled
         recvd_rpc =  @server.request_call
-- 
GitLab