зеркало из https://github.com/github/ruby.git
Fix flaky test test_stat_heap
The test sometimes fails with: 1) Failure: TestGc#test_stat_heap [/tmp/ruby/src/trunk-repeat50/test/ruby/test_gc.rb:169]: Expected 33434403 to be <= 33434354.
This commit is contained in:
Родитель
3c47114991
Коммит
ce436ff3e3
|
@ -151,8 +151,13 @@ class TestGc < Test::Unit::TestCase
|
|||
GC.stat(stat)
|
||||
|
||||
GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT].times do |i|
|
||||
GC.stat_heap(i, stat_heap)
|
||||
GC.stat(stat)
|
||||
begin
|
||||
reenable_gc = !GC.disable
|
||||
GC.stat_heap(i, stat_heap)
|
||||
GC.stat(stat)
|
||||
ensure
|
||||
GC.enable if reenable_gc
|
||||
end
|
||||
|
||||
assert_equal GC::INTERNAL_CONSTANTS[:RVALUE_SIZE] * (2**i), stat_heap[:slot_size]
|
||||
assert_operator stat_heap[:heap_allocatable_pages], :<=, stat[:heap_allocatable_pages]
|
||||
|
|
Загрузка…
Ссылка в новой задаче