mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/ruby/test_array.rb (test_sort_with_replace): run in a subprocess
This test invokes GC.start 100 times, which takes approx. six minutes in Solaris. This change runs the test in a separated process, which makes GC.start faster.
This commit is contained in:
parent
04bc4c0662
commit
a84a99ffab
1 changed files with 15 additions and 7 deletions
|
@ -1610,6 +1610,10 @@ class TestArray < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_sort_with_replace
|
def test_sort_with_replace
|
||||||
|
bug = '[ruby-core:34732]'
|
||||||
|
assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}", timeout: 30)
|
||||||
|
bug = "#{bug}"
|
||||||
|
begin;
|
||||||
xary = (1..100).to_a
|
xary = (1..100).to_a
|
||||||
100.times do
|
100.times do
|
||||||
ary = (1..100).to_a
|
ary = (1..100).to_a
|
||||||
|
@ -1617,6 +1621,10 @@ class TestArray < Test::Unit::TestCase
|
||||||
GC.start
|
GC.start
|
||||||
assert_equal(xary, ary, '[ruby-dev:34732]')
|
assert_equal(xary, ary, '[ruby-dev:34732]')
|
||||||
end
|
end
|
||||||
|
assert_nothing_raised(SystemStackError, bug) do
|
||||||
|
assert_equal(:ok, Array.new(100_000, nil).permutation {break :ok})
|
||||||
|
end
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_sort_bang_with_freeze
|
def test_sort_bang_with_freeze
|
||||||
|
|
Loading…
Reference in a new issue