summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-29 22:20:12 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-29 22:20:12 +0000
commit47f3c4d1477ebc479a5e0ab4342e1d86604caeb9 (patch)
tree8c114de1b1c51abb89eb7e15c32938fdf9baafb9
parent4bf8834dc8e124446bd2447ad38c96d677eceb59 (diff)
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
-rw-r--r--test/ruby/test_thread.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 98a7d15c6a..eb08a22ef7 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -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