aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/bin
diff options
context:
space:
mode:
authorGravatar Tim Emiola <temiola@google.com>2015-06-02 11:28:03 -0700
committerGravatar Tim Emiola <temiola@google.com>2015-06-02 11:28:03 -0700
commitd62d345b836f20ca0bc1c4fbe57072fee0f8375d (patch)
tree445d96c9731523071d79fb5b2fdc92ae1016c739 /src/ruby/bin
parent0bdfe8b147b8101080e95565d9472e402f4d98d4 (diff)
Corrects the cancel_after_first_response test
- stops attempting to verify by catching the CancelledError - instead the test examines the operation state after cancellation, which is equally valid and more stable. Also - simplifies bidi on the server
Diffstat (limited to 'src/ruby/bin')
-rwxr-xr-xsrc/ruby/bin/interop/interop_client.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ruby/bin/interop/interop_client.rb b/src/ruby/bin/interop/interop_client.rb
index 8df03ffb3c..16fb1b199d 100755
--- a/src/ruby/bin/interop/interop_client.rb
+++ b/src/ruby/bin/interop/interop_client.rb
@@ -274,6 +274,7 @@ class NamedTests
op = @stub.streaming_input_call(reqs, return_op: true)
op.cancel
assert_raises(GRPC::Cancelled) { op.execute }
+ assert(op.cancelled, 'call operation should be CANCELLED')
p 'OK: cancel_after_begin'
end
@@ -282,7 +283,8 @@ class NamedTests
ppp = PingPongPlayer.new(msg_sizes)
op = @stub.full_duplex_call(ppp.each_item, return_op: true)
ppp.canceller_op = op # causes ppp to cancel after the 1st message
- assert_raises(GRPC::Cancelled) { op.execute.each { |r| ppp.queue.push(r) } }
+ op.execute.each { |r| ppp.queue.push(r) }
+ assert(op.cancelled, 'call operation should be CANCELLED')
p 'OK: cancel_after_first_response'
end