diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-21 17:17:41 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-21 17:17:41 +0000 |
commit | 9d8bf3b9ee784de6cb54a210a601cf2dc662f8a9 (patch) | |
tree | 328a07b7bcbd3f69ca714a57c6c82508bec4100f | |
parent | 3ef72aebef3ec06295bc3f14c2a09da91a44ff31 (diff) | |
download | ruby-9d8bf3b9ee784de6cb54a210a601cf2dc662f8a9.tar.gz |
add timeout for test_should_propagate_signaled.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_beginendblock.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb index caed180613..0000985952 100644 --- a/test/ruby/test_beginendblock.rb +++ b/test/ruby/test_beginendblock.rb @@ -1,5 +1,6 @@ require 'test/unit' require 'tempfile' +require 'timeout' require_relative 'envutil' class TestBeginEndBlock < Test::Unit::TestCase @@ -97,7 +98,9 @@ EOW [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 |