tests: increase timeouts and speedup some slow tests
I'm still using the computer from 2005, so enabling MJIT makes some tests take longer. For test_deadlock_by_signal_at_forking I got it down to 135s to 89s by disabling RubyGems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ddb301b6a2
commit
6c74c73f95
@ -30,11 +30,11 @@ assert_finish 10, %q{
|
|||||||
end
|
end
|
||||||
}, '[ruby-dev:32566]'
|
}, '[ruby-dev:32566]'
|
||||||
|
|
||||||
assert_finish 1, %q{
|
assert_finish 2, %q{
|
||||||
r, w = IO.pipe
|
r, w = IO.pipe
|
||||||
Thread.new {
|
Thread.new(Thread.current) { |parent|
|
||||||
w << "ab"
|
w << "ab"
|
||||||
sleep 0.01
|
Thread.pass until parent.stop?
|
||||||
w << "ab"
|
w << "ab"
|
||||||
}
|
}
|
||||||
r.gets("abab")
|
r.gets("abab")
|
||||||
|
@ -1328,7 +1328,7 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
|
|||||||
end
|
end
|
||||||
raise Bug14566
|
raise Bug14566
|
||||||
end;
|
end;
|
||||||
assert_in_out_err([], code, [], /Bug14566/, success: false, timeout: 1)
|
assert_in_out_err([], code, [], /Bug14566/, success: false, timeout: 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_super_in_method_missing
|
def test_super_in_method_missing
|
||||||
|
@ -2685,7 +2685,7 @@ __END__
|
|||||||
end;
|
end;
|
||||||
10.times.map do
|
10.times.map do
|
||||||
Thread.start do
|
Thread.start do
|
||||||
assert_in_out_err([], src) {|stdout, stderr|
|
assert_in_out_err([], src, timeout: 20) {|stdout, stderr|
|
||||||
assert_no_match(/hi.*hi/, stderr.join, bug3585)
|
assert_no_match(/hi.*hi/, stderr.join, bug3585)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -2198,7 +2198,7 @@ EOS
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_deadlock_by_signal_at_forking
|
def test_deadlock_by_signal_at_forking
|
||||||
assert_separately(["-", RUBY], <<-INPUT, timeout: 80)
|
assert_separately(%W(--disable=gems - #{RUBY}), <<-INPUT, timeout: 100)
|
||||||
ruby = ARGV.shift
|
ruby = ARGV.shift
|
||||||
GC.start # reduce garbage
|
GC.start # reduce garbage
|
||||||
GC.disable # avoid triggering CoW after forks
|
GC.disable # avoid triggering CoW after forks
|
||||||
@ -2206,7 +2206,7 @@ EOS
|
|||||||
parent = $$
|
parent = $$
|
||||||
100.times do |i|
|
100.times do |i|
|
||||||
pid = fork {Process.kill(:QUIT, parent)}
|
pid = fork {Process.kill(:QUIT, parent)}
|
||||||
IO.popen(ruby, 'r+'){}
|
IO.popen([ruby, -'--disable=gems'], -'r+'){}
|
||||||
Process.wait(pid)
|
Process.wait(pid)
|
||||||
$stdout.puts
|
$stdout.puts
|
||||||
$stdout.flush
|
$stdout.flush
|
||||||
|
Loading…
x
Reference in New Issue
Block a user