ruby-changes:14858
From: akr <ko1@a...>
Date: Mon, 22 Feb 2010 02:17:53 +0900 (JST)
Subject: [ruby-changes:14858] Ruby:r26724 (trunk): add timeout for test_should_propagate_signaled.
akr 2010-02-22 02:17:41 +0900 (Mon, 22 Feb 2010) New Revision: 26724 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26724 Log: add timeout for test_should_propagate_signaled. Modified files: trunk/test/ruby/test_beginendblock.rb Index: test/ruby/test_beginendblock.rb =================================================================== --- test/ruby/test_beginendblock.rb (revision 26723) +++ test/ruby/test_beginendblock.rb (revision 26724) @@ -1,5 +1,6 @@ require 'test/unit' require 'tempfile' +require 'timeout' require_relative 'envutil' class TestBeginEndBlock < Test::Unit::TestCase @@ -97,7 +98,9 @@ [ruby, '-e', 'STDERR.reopen(STDOUT)', '-e', 'at_exit{Process.kill(:INT, $$); loop{}}']) {|f| - f.read + timeout(1) { + f.read + } } assert_match(/Interrupt$/, out) Process.kill(0, 0) rescue return # check if signal works -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/