зеркало из https://github.com/github/ruby.git
Try GC more during suppressing the warning
This commit is contained in:
Родитель
ed51e8b8fa
Коммит
2d0a1e5f61
|
@ -462,7 +462,12 @@ class TestGc < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
gen[100]
|
gen[100]
|
||||||
EnvUtil.suppress_warning {GC.start}
|
EnvUtil.suppress_warning do
|
||||||
|
1000.times do
|
||||||
|
break if result.size >= 2
|
||||||
|
GC.start
|
||||||
|
end
|
||||||
|
end
|
||||||
skip "finalizers did not get run" if result.empty?
|
skip "finalizers did not get run" if result.empty?
|
||||||
assert_equal([:c1, :c2], result)
|
assert_equal([:c1, :c2], result)
|
||||||
end
|
end
|
||||||
|
@ -488,7 +493,12 @@ class TestGc < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
gen[100]
|
gen[100]
|
||||||
EnvUtil.suppress_warning {GC.start}
|
EnvUtil.suppress_warning do
|
||||||
|
1000.times do
|
||||||
|
break if @result.size >= 2
|
||||||
|
GC.start
|
||||||
|
end
|
||||||
|
end
|
||||||
skip "finalizers did not get run" if @result.empty?
|
skip "finalizers did not get run" if @result.empty?
|
||||||
assert_equal([:c1, :c2], @result)
|
assert_equal([:c1, :c2], @result)
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче