Skip to content

Commit 9a840fd

Browse files
committed
Relax the criteria of flaky weak_references count test
1 parent a259ce4 commit 9a840fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/ruby/test_gc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def test_latest_gc_info_weak_references_count
419419
GC.start
420420
421421
# Sometimes the WeakMap has a few elements, which might be held on by registers.
422-
assert_operator(wmap.size, :<=, 2)
422+
assert_operator(wmap.size, :<=, count / 1000)
423423
424424
assert_operator(GC.latest_gc_info(:weak_references_count), :<=, before_weak_references_count - count + error_tolerance)
425425
assert_operator(GC.latest_gc_info(:retained_weak_references_count), :<=, before_retained_weak_references_count - count + error_tolerance)

0 commit comments

Comments
 (0)