diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-22 08:08:03 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-22 08:08:03 +0000 |
commit | db68ccc20da6a3668dc514f128b3236e455822d0 (patch) | |
tree | 3617f7290698ec8a86f38831b0092a4a58cd10b9 /test/ruby | |
parent | 18492887224cd1aa1aa862ed0fa5237df31ead81 (diff) |
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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_thread.rb | 5 |
1 files changed, 2 insertions, 3 deletions
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!) |