aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_fiber.rb23
1 files changed, 12 insertions, 11 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb
index 44bdbfc2f7..611b119033 100644
--- a/test/ruby/test_fiber.rb
+++ b/test/ruby/test_fiber.rb
@@ -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