ruby: fix a unit test to make sure it always terminates the RPC (#31494)

pull/31510/head
apolcyn 2 years ago committed by GitHub
parent 824049da60
commit 6f1dcffef8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      src/ruby/spec/generic/active_call_spec.rb

@ -65,12 +65,21 @@ describe GRPC::ActiveCall do
describe 'restricted view methods' do
before(:each) do
call = make_test_call
ActiveCall.client_invoke(call)
@client_call = ActiveCall.new(call, @pass_through,
@call = make_test_call
ActiveCall.client_invoke(@call)
@client_call = ActiveCall.new(@call, @pass_through,
@pass_through, deadline)
end
after(:each) do
# terminate the RPC that was started in before(:each)
recvd_rpc = @received_rpcs_queue.pop
recvd_call = recvd_rpc.call
recvd_call.run_batch(CallOps::SEND_INITIAL_METADATA => nil)
@call.run_batch(CallOps::RECV_INITIAL_METADATA => nil)
send_and_receive_close_and_status(@call, recvd_call)
end
describe '#multi_req_view' do
it 'exposes a fixed subset of the ActiveCall.methods' do
want = %w(cancelled?, deadline, each_remote_read, metadata, \

Loading…
Cancel
Save