From 08929b344d89fb12fb3a12eccf686458dc820e6d Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 6 Sep 2023 13:31:50 -0400 Subject: [PATCH] Try to fix flaky test_warmup_frees_pages This test sometimes fails with: ``` 1) Failure: TestProcess#test_warmup_frees_pages [test/ruby/test_process.rb:2750]: <202> expected but was <203>. ``` --- test/ruby/test_process.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index d7910e5acf..dc0ccd1f77 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -2742,6 +2742,9 @@ EOS ary.clear ary = nil + # Disable GC so we can make sure GC only runs in Process.warmup + GC.disable + total_pages_before = GC.stat(:heap_eden_pages) + GC.stat(:heap_allocatable_pages) Process.warmup