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
@ -406,6 +406,9 @@ class TestGc < Test::Unit::TestCase
|
|||||||
# This test prevents bugs like [Bug #18929]
|
# This test prevents bugs like [Bug #18929]
|
||||||
|
|
||||||
assert_separately %w[--disable-gem], __FILE__, __LINE__, <<-'RUBY'
|
assert_separately %w[--disable-gem], __FILE__, __LINE__, <<-'RUBY'
|
||||||
|
# Grow the heap
|
||||||
|
@ary = 100_000.times.map { Object.new }
|
||||||
|
|
||||||
# Warmup to make sure heap stabilizes
|
# Warmup to make sure heap stabilizes
|
||||||
1_000_000.times { Object.new }
|
1_000_000.times { Object.new }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user