mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
78625e5852
commit
897a3fce91
1 changed files with 12 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue