ruby-changes:42427
From: nobu <ko1@a...>
Date: Wed, 6 Apr 2016 16:03:01 +0900 (JST)
Subject: [ruby-changes:42427] nobu:r54501 (trunk): btest: resource limit
nobu 2016-04-06 16:59:37 +0900 (Wed, 06 Apr 2016) New Revision: 54501 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54501 Log: btest: resource limit * bootstraptest/test_thread.rb: rescue resource limitation errors. Modified files: trunk/bootstraptest/test_thread.rb Index: bootstraptest/test_thread.rb =================================================================== --- bootstraptest/test_thread.rb (revision 54500) +++ bootstraptest/test_thread.rb (revision 54501) @@ -25,8 +25,9 @@ rescue ThreadError => e https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_thread.rb#L25 :ok if /can't create Thread/ =~ e.message end } -assert_equal %q{5000}, %q{ - 5000.times{|e| +assert_equal %q{ok}, %q{ +begin + :ok if 5000 == 5000.times{|e| (1..2).map{ Thread.new{ } @@ -34,9 +35,13 @@ assert_equal %q{5000}, %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_thread.rb#L35 e.join() } } +rescue ThreadError => e + :ok if /can't create Thread/ =~ e.message +end } -assert_equal %q{5000}, %q{ - 5000.times{|e| +assert_equal %q{ok}, %q{ +begin + :ok if 5000 == 5000.times{|e| (1..2).map{ Thread.new{ } @@ -44,6 +49,9 @@ assert_equal %q{5000}, %q{ https://github.com/ruby/ruby/blob/trunk/bootstraptest/test_thread.rb#L49 e.join(1000000000) } } +rescue ThreadError => e + :ok if /can't create Thread/ =~ e.message +end } assert_equal %q{ok}, %q{ begin -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/