ruby-changes:70044
From: Jean <ko1@a...>
Date: Fri, 3 Dec 2021 20:27:45 +0900 (JST)
Subject: [ruby-changes:70044] 324d57df0b (master): TestClass#test_subclass_gc reduce the number of iteration by 10x
https://git.ruby-lang.org/ruby.git/commit/?id=324d57df0b From 324d57df0b28982590609d7ae080f82074a82a5c Mon Sep 17 00:00:00 2001 From: Jean Boussier <jean.boussier@g...> Date: Fri, 3 Dec 2021 10:17:21 +0100 Subject: 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. --- test/ruby/test_class.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 0ceb36bb1d3..28285705bf3 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -793,11 +793,11 @@ class TestClass < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_class.rb#L793 def test_subclass_gc c = Class.new - 100000.times do + 10_000.times do cc = Class.new(c) 100.times { Class.new(cc) } end - assert(c.subclasses.size <= 100000) + assert(c.subclasses.size <= 10_000) end def test_subclass_gc_stress -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/