diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2025-03-10 15:43:44 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-03-10 20:00:47 -0400 |
| commit | 47c3ae6962900434b6ffd486decd639b76f3d54d (patch) | |
| tree | bd50cc92c8d68d2ba1bea30cdd34b66b8e7eb3d1 /test/ruby | |
| parent | ba5fb74583303d9e80f3700d0b5433cbc7e7c88e (diff) | |
Bump tolerance for weak reference test from 1 to 2
The test fails sometimes with:
TestGc#test_latest_gc_info_weak_references_count [test/ruby/test_gc.rb:421]:
Expected 2 to be <= 1.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12894
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_gc.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 3bef10dd18..b0794c0845 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -417,8 +417,8 @@ class TestGc < Test::Unit::TestCase # Run full GC again to collect stats about weak references GC.start - # Sometimes the WeakMap has one element, which might be held on by registers. - assert_operator(wmap.size, :<=, 1) + # Sometimes the WeakMap has a few elements, which might be held on by registers. + assert_operator(wmap.size, :<=, 2) assert_operator(GC.latest_gc_info(:weak_references_count), :<=, before_weak_references_count - count + error_tolerance) assert_operator(GC.latest_gc_info(:retained_weak_references_count), :<=, before_retained_weak_references_count - count + error_tolerance) |
