From 7a0bb1afb81da3c83f2cc59403826e1f855d3f0d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 3 Aug 2010 17:11:32 -0700 Subject: test: make GC test (hopefully) more reliable It's not pretty... --- test/test_raindrops_gc.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_raindrops_gc.rb b/test/test_raindrops_gc.rb index b473619..a1fc3de 100644 --- a/test/test_raindrops_gc.rb +++ b/test/test_raindrops_gc.rb @@ -4,9 +4,12 @@ require 'raindrops' class TestRaindropsGc < Test::Unit::TestCase + # we may need to create more garbage as GC may be less aggressive + # about expiring things. This is completely unrealistic code, + # though... def test_gc assert_nothing_raised do - 1000000.times { Raindrops.new(24) } + 1000000.times { |i| Raindrops.new(24); [] } end end -- cgit v1.2.3-24-ge0c7