summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-13 21:55:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-13 21:55:17 +0000
commite50746da001ec16cbed6a6c842f43cf0f4de9364 (patch)
tree7b90bb35b65be16c35a2efb6fb9b1eb34abdb1d1
parent95083356b9f46d4d10389fcf3520b883ec7c275d (diff)
test_gc.rb: wait
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): wait longer and send more interrupts for slower cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_gc.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 4bcf7593d2..f159421dac 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -342,10 +342,12 @@ class TestGc < Test::Unit::TestCase
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