From db68ccc20da6a3668dc514f128b3236e455822d0 Mon Sep 17 00:00:00 2001 From: normal Date: Sat, 22 Dec 2018 08:08:03 +0000 Subject: test/ruby/test_thread.rb (test_fork_while_parent_locked): reduce threads Reduce thread counts unconditionally for some CI systems with low limits.. And Solaris apparently lacks RLIMIT_NPROC, so we can't detect resource limits and scale the test appropriately. [ruby-core:90670] [Bug #15430] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_thread.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/ruby/test_thread.rb') diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index cf8ae2d69c..904e3e7fae 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -1246,8 +1246,7 @@ q.pop failures = 0 run = true errs = '' - nr = 50 - nr /= 2 if Process.getrlimit(:NPROC)[0] <= 4096 # Bug 15430 + nr = 25 # reduce if more SIGKILL in tests tmps = nr.times.map { Tempfile.new('Bug.15430.diagnosis') } thrs = nr.times.map do |_i| Thread.new(_i) do |i| @@ -1276,7 +1275,7 @@ q.pop sleep 0.5 run = false thrs.each(&:join) - assert_empty errs + assert_empty errs, "lower `nr' if SIGKILL because of RLIMIT_NPROC limit" assert_equal 0, failures, '[ruby-core:90312] [Bug #15383]' ensure tmps&.each(&:close!) -- cgit v1.2.3