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

ruby-changes:36751

From: nobu <ko1@a...>
Date: Sun, 14 Dec 2014 06:56:05 +0900 (JST)
Subject: [ruby-changes:36751] nobu:r48832 (trunk): test_gc.rb: wait

nobu	2014-12-14 06:55:17 +0900 (Sun, 14 Dec 2014)

  New Revision: 48832

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

  Log:
    test_gc.rb: wait
    
    * test/ruby/test_gc.rb (test_interrupt_in_finalizer): wait longer
      and send more interrupts for slower cases.

  Modified files:
    trunk/test/ruby/test_gc.rb
Index: test/ruby/test_gc.rb
===================================================================
--- test/ruby/test_gc.rb	(revision 48831)
+++ test/ruby/test_gc.rb	(revision 48832)
@@ -342,10 +342,12 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L342
     error = nil
     status = nil
     EnvUtil.invoke_ruby(["-e", src], "", false, true) do |_, _, stderr, pid|
-      sleep 0.1
-      Process.kill("INT", pid)
+      10.times {
+        sleep 0.1
+        Process.kill("INT", pid) rescue break
+      }
       th = Thread.start do
-        sleep 1
+        sleep 5
         Process.kill("KILL", pid) rescue nil
       end
       error = stderr.read

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

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