Dont assume that sigint wasnt masked when invoking ruby tests

pull/12681/head
Alexander Polcyn 8 years ago
parent 22410e0d99
commit 2f3e588099
  1. 2
      src/ruby/end2end/killed_client_thread_client.rb
  2. 8
      src/ruby/end2end/killed_client_thread_driver.rb

@ -35,7 +35,7 @@ def main
:this_channel_is_insecure)
stub.echo(Echo::EchoRequest.new(request: 'hello'))
fail 'the clients rpc in this test shouldnt complete. ' \
'expecting SIGINT to happen in the middle of the call'
'expecting SIGTERM to happen in the middle of the call'
end
thd.join
end

@ -69,9 +69,9 @@ def main
call_started_cv.wait(call_started_mu) until call_started.val
end
# SIGINT the child process now that it's
# SIGTERM the child process now that it's
# in the middle of an RPC (happening on a non-main thread)
Process.kill('SIGINT', client_pid)
Process.kill('SIGTERM', client_pid)
STDERR.puts 'sent shutdown'
begin
@ -88,8 +88,8 @@ def main
end
client_exit_code = $CHILD_STATUS
if client_exit_code.termsig != 2 # SIGINT
fail 'expected client exit from SIGINT ' \
if client_exit_code.termsig != 15 # SIGTERM
fail 'expected client exit from SIGTERM ' \
"but got child status: #{client_exit_code}"
end

Loading…
Cancel
Save