diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-06 07:59:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-06 07:59:37 +0000 |
commit | 373a7006dd0555960a61cf9c1273de4a1e2a42d5 (patch) | |
tree | b654c4faa1f93c8a1c5495c446624a64c43b4786 /bootstraptest/test_thread.rb | |
parent | 469bac0f9233d8ad2b53bea2f382578634fabf65 (diff) |
btest: resource limit
* bootstraptest/test_thread.rb: rescue resource limitation errors.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_thread.rb')
-rw-r--r-- | bootstraptest/test_thread.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb index d64f44be49..747b6b88f7 100644 --- a/bootstraptest/test_thread.rb +++ b/bootstraptest/test_thread.rb @@ -25,8 +25,9 @@ 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{ } @@ -34,9 +35,13 @@ assert_equal %q{5000}, %q{ 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{ e.join(1000000000) } } +rescue ThreadError => e + :ok if /can't create Thread/ =~ e.message +end } assert_equal %q{ok}, %q{ begin |