summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2023-07-11 14:09:48 -0400
committerPeter Zhu <[email protected]>2023-07-11 15:05:10 -0400
commit7299c8c0f165247853fac2fe337e7c2678e653c9 ()
tree85d4aa92d59eee077e658b7c9b484c10d227eaaa
parent84d0667ea8211fad830e744ab9cacd3f1770395d (diff)
Try to fix flaky GC test
assert_not_nil could allocate objects which may trigger the major GC, so don't run the assertions until the major GC has been ran.
Notes: Merged: https://.com/ruby/ruby/pull/8055
-rw-r--r--test/ruby/test_gc.rb7
1 files changed, 5 insertions, 2 deletions
@@ -262,9 +262,12 @@ class TestGc < Test::Unit::TestCase
objects.append(100.times.map { '*' })
end
- assert_not_nil GC.latest_gc_info(:need_major_by)
GC.start(full_mark: false) # should be upgraded to major
- assert_not_nil GC.latest_gc_info(:major_by)
end
def test_stress_compile_send