TestClass#test_subclass_gc reduce the number of iteration by 10x

The test was taking 10 seconds on my machine and did timeout
on CI once.
This commit is contained in:
Jean Boussier 2021-12-03 10:17:21 +01:00 committed by Yusuke Endoh
parent 0073f624f0
commit 324d57df0b
Notes: git 2021-12-03 20:27:49 +09:00

View File

@ -793,11 +793,11 @@ class TestClass < Test::Unit::TestCase
def test_subclass_gc def test_subclass_gc
c = Class.new c = Class.new
100000.times do 10_000.times do
cc = Class.new(c) cc = Class.new(c)
100.times { Class.new(cc) } 100.times { Class.new(cc) }
end end
assert(c.subclasses.size <= 100000) assert(c.subclasses.size <= 10_000)
end end
def test_subclass_gc_stress def test_subclass_gc_stress