Skip to content

Commit

Permalink
Add logs to a ruby test (grpc#30604)
Browse files Browse the repository at this point in the history
  • Loading branch information
apolcyn authored Aug 17, 2022
1 parent b2be531 commit 36e820e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ruby/spec/channel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,19 @@ def construct_with_args(a)
end

it 'raises an error if called on a closed channel' do
STDERR.puts "#{Time.now}: begin: raises an error if called on a closed channel"
ch = GRPC::Core::Channel.new(fake_host, nil, :this_channel_is_insecure)
STDERR.puts "#{Time.now}: created channel"
ch.close
STDERR.puts "#{Time.now}: closed channel"

deadline = Time.now + 5
blk = proc do
ch.create_call(nil, nil, 'phony_method', nil, deadline)
STDERR.puts "#{Time.now}: created call"
end
expect(&blk).to raise_error(RuntimeError)
STDERR.puts "#{Time.now}: finished: raises an error if called on a closed channel"
end

it 'raises if grpc was initialized in another process' do
Expand Down

0 comments on commit 36e820e

Please sign in to comment.