mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/ruby/test_process.rb: Use EnvUtil.timeout for timeout scale factor
https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190526T052508Z.fail.html.gz
This commit is contained in:
parent
4668a3a9da
commit
2df2cdcff0
1 changed files with 4 additions and 4 deletions
|
@ -1724,7 +1724,7 @@ class TestProcess < Test::Unit::TestCase
|
||||||
|
|
||||||
with_tmpchdir do
|
with_tmpchdir do
|
||||||
assert_nothing_raised('[ruby-dev:12261]') do
|
assert_nothing_raised('[ruby-dev:12261]') do
|
||||||
Timeout.timeout(3) do
|
EnvUtil.timeout(3) do
|
||||||
pid = spawn('yes | ls')
|
pid = spawn('yes | ls')
|
||||||
Process.waitpid pid
|
Process.waitpid pid
|
||||||
end
|
end
|
||||||
|
@ -1796,7 +1796,7 @@ class TestProcess < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
else # darwin
|
else # darwin
|
||||||
def test_daemon_no_threads
|
def test_daemon_no_threads
|
||||||
data = Timeout.timeout(3) do
|
data = EnvUtil.timeout(3) do
|
||||||
IO.popen("-") do |f|
|
IO.popen("-") do |f|
|
||||||
break f.readlines.map(&:chomp) if f
|
break f.readlines.map(&:chomp) if f
|
||||||
th = Thread.start {sleep 3}
|
th = Thread.start {sleep 3}
|
||||||
|
@ -2311,7 +2311,7 @@ EOS
|
||||||
def test_signals_work_after_exec_fail
|
def test_signals_work_after_exec_fail
|
||||||
r, w = IO.pipe
|
r, w = IO.pipe
|
||||||
pid = status = nil
|
pid = status = nil
|
||||||
Timeout.timeout(30) do
|
EnvUtil.timeout(30) do
|
||||||
pid = fork do
|
pid = fork do
|
||||||
r.close
|
r.close
|
||||||
begin
|
begin
|
||||||
|
@ -2345,7 +2345,7 @@ EOS
|
||||||
def test_threading_works_after_exec_fail
|
def test_threading_works_after_exec_fail
|
||||||
r, w = IO.pipe
|
r, w = IO.pipe
|
||||||
pid = status = nil
|
pid = status = nil
|
||||||
Timeout.timeout(90) do
|
EnvUtil.timeout(90) do
|
||||||
pid = fork do
|
pid = fork do
|
||||||
r.close
|
r.close
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Add table
Reference in a new issue