mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add timeout for test_should_propagate_signaled.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3ef72aebef
commit
9d8bf3b9ee
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue