mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix flaky test test_thrashing_for_young_objects
The test could be flaky when a heap has below GC_HEAP_INIT_SLOTS number of free slots because it would trigger a major GC and allocate more pages.
This commit is contained in:
parent
8483737bbf
commit
b22a2803a8
1 changed files with 3 additions and 0 deletions
|
@ -406,6 +406,9 @@ class TestGc < Test::Unit::TestCase
|
|||
# This test prevents bugs like [Bug #18929]
|
||||
|
||||
assert_separately %w[--disable-gem], __FILE__, __LINE__, <<-'RUBY'
|
||||
# Grow the heap
|
||||
@ary = 100_000.times.map { Object.new }
|
||||
|
||||
# Warmup to make sure heap stabilizes
|
||||
1_000_000.times { Object.new }
|
||||
|
||||
|
|
Loading…
Reference in a new issue