From da2453c58de9b1bc6ab58296980b2b79a9213a90 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Sat, 19 Apr 2025 20:10:39 +0900 Subject: [PATCH] Add debug message to test_heaps_grow_independently To debug flaky failures on i686 that look like: 1) Failure: TestGc#test_heaps_grow_independently [test/ruby/test_gc.rb:704]: Expected 2061929 to be < 2000000. --- test/ruby/test_gc.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index a1229fc87a..e9b452c702 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -703,7 +703,9 @@ class TestGc < Test::Unit::TestCase allocate_large_object end - assert_operator(GC.stat(:heap_available_slots), :<, COUNT * 2) + heap_available_slots = GC.stat(:heap_available_slots) + + assert_operator(heap_available_slots, :<, COUNT * 2, "GC.stat: #{GC.stat}\nGC.stat_heap: #{GC.stat_heap}") RUBY end