Use assert_normal_exit to split process

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-10-29 08:52:59 +00:00
parent 78625e5852
commit 897a3fce91

View File

@ -47,20 +47,21 @@ class TestFiber < Test::Unit::TestCase
end
def test_many_fibers_with_threads
max = 1000
@cnt = 0
(1..100).map{|ti|
Thread.new{
max.times{|i|
Fiber.new{
@cnt += 1
}.resume
assert_normal_exit %q{
max = 1000
@cnt = 0
(1..100).map{|ti|
Thread.new{
max.times{|i|
Fiber.new{
@cnt += 1
}.resume
}
}
}.each{|t|
t.join
}
}.each{|t|
t.join
}
assert_equal(:ok, :ok)
end
def test_error