aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-06 07:59:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-06 07:59:37 +0000
commit373a7006dd0555960a61cf9c1273de4a1e2a42d5 (patch)
treeb654c4faa1f93c8a1c5495c446624a64c43b4786
parent469bac0f9233d8ad2b53bea2f382578634fabf65 (diff)
downloadruby-373a7006dd0555960a61cf9c1273de4a1e2a42d5.tar.gz
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
-rw-r--r--bootstraptest/test_thread.rb16
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