1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_thread.rb (test_thread_interrupt_for_killed_thread): reprieve for MJIT

With MJIT enabled, the exit (from SIGTERM) may take a long time
to complete.  Prevent EnvUtil.invoke_ruby from falling back to
other signals (SIGABRT) when Process.wait takes longer than the
default 1s reprieve.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2018-06-29 22:20:12 +00:00
parent 4bf8834dc8
commit 47f3c4d147

View file

@ -1286,7 +1286,12 @@ q.pop
end
def test_thread_interrupt_for_killed_thread
assert_normal_exit(<<-_end, '[Bug #8996]', timeout: 5, timeout_error: nil)
opts = { timeout: 5, timeout_error: nil }
# prevent SIGABRT from slow shutdown with MJIT
opts[:reprieve] = 3 if RubyVM::MJIT.enabled?
assert_normal_exit(<<-_end, '[Bug #8996]', opts)
Thread.report_on_exception = false
trap(:TERM){exit}
while true