[前][次][番号順一覧][スレッド一覧]

ruby-changes:51331

From: nobu <ko1@a...>
Date: Thu, 31 May 2018 15:57:53 +0900 (JST)
Subject: [ruby-changes:51331] nobu:r63537 (trunk): test_rubyoptions.rb: relax timeout

nobu	2018-05-31 15:57:47 +0900 (Thu, 31 May 2018)

  New Revision: 63537

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63537

  Log:
    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.

  Modified files:
    trunk/test/ruby/test_rubyoptions.rb
Index: test/ruby/test_rubyoptions.rb
===================================================================
--- test/ruby/test_rubyoptions.rb	(revision 63536)
+++ test/ruby/test_rubyoptions.rb	(revision 63537)
@@ -590,11 +590,11 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L590
 
       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::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L616
 
       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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]