summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-31 06:57:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-31 06:57:47 +0000
commit83b14c26aaf9d55774320ed65273b9c6d6c3c432 (patch)
tree746d9cb16fd9ad39308ef06cb4308abd5574bc6a
parent9e82c4f1c18ff796629fd4ba9365462c276306c9 (diff)
test_rubyoptions.rb: relax timeout
* test/ruby/test_rubyoptions.rb: wait for setting process title until the child process dies, in the case of extra heavy loads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_rubyoptions.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index afaa8a2..86b6022 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -590,11 +590,11 @@ class TestRubyOptions < Test::Unit::TestCase
pid = spawn(EnvUtil.rubybin, "test-script")
ps = nil
- 10.times do
+ begin
sleep 0.1
ps = `#{PSCMD.join(' ')} #{pid}`
break if /hello world/ =~ ps
- end
+ end while Process.wait(pid, Process::WNOHANG)
assert_match(/hello world/, ps)
Process.kill :KILL, pid
Process.wait(pid)
@@ -616,11 +616,11 @@ class TestRubyOptions < Test::Unit::TestCase
pid = spawn(EnvUtil.rubybin, "test-script")
ps = nil
- 10.times do
+ begin
sleep 0.1
ps = `#{PSCMD.join(' ')} #{pid}`
break if /hello world/ =~ ps
- end
+ end while Process.wait(pid, Process::WNOHANG)
assert_match(/hello world/, ps)
Process.kill :KILL, pid
Process.wait(pid)