From fcc5a19e2f9801217691a842250db937de3ea5ee Mon Sep 17 00:00:00 2001 From: k0kubun Date: Thu, 27 Dec 2018 16:42:41 +0000 Subject: [PATCH] test_method.rb: do not kill RubyCI openSUSE machine with NoMemoryError on TestMethod#test_splat_long_array. https://rubyci.org/logs/rubyci.s3.amazonaws.com/opensuseleap/ruby-trunk/log/20181227T080002Z.log.html.gz Maybe better to check /proc/meminfo instead of /etc/os-release. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_method.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 65d9e3d2e1..a9051b81fa 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -949,6 +949,10 @@ class TestMethod < Test::Unit::TestCase end def test_splat_long_array + if File.exist?('/etc/os-release') && File.read('/etc/os-release').include?('openSUSE Leap') + # For RubyCI's openSUSE machine http://rubyci.s3.amazonaws.com/opensuseleap/ruby-trunk/recent.html, which tends to die with NoMemoryError here. + skip 'do not exhaust memory on RubyCI openSUSE Leap machine' + end n = 10_000_000 assert_equal n , rest_parameter(*(1..n)).size, '[Feature #10440]' end