diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | test/ruby/test_fiber.rb | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Mon Aug 19 17:43:44 2013 Koichi Sasada <ko1@atdot.net> + + * test/ruby/test_fiber.rb: collect garbage fibers immediately. + Mon Aug 19 17:41:49 2013 Koichi Sasada <ko1@atdot.net> * test/profile_test_all.rb: add `failed?' information. diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb index f3cfaa273b..6c5bb891a2 100644 --- a/test/ruby/test_fiber.rb +++ b/test/ruby/test_fiber.rb @@ -33,16 +33,18 @@ class TestFiber < Test::Unit::TestCase end def test_many_fibers - max = 10000 + max = 10_000 assert_equal(max, max.times{ Fiber.new{} }) + GC.start # force collect created fibers assert_equal(max, max.times{|i| Fiber.new{ }.resume } ) + GC.start # force collect created fibers end def test_many_fibers_with_threads |