diff options
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index afaa8a2904..86b6022b82 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) |