mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Avoid timing problem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b73d1fbd25
commit
cb2235c112
1 changed files with 1 additions and 5 deletions
|
@ -1187,13 +1187,9 @@ class TestProcess < Test::Unit::TestCase
|
|||
def test_wait_and_sigchild
|
||||
signal_received = []
|
||||
Signal.trap(:CHLD) { signal_received << true }
|
||||
pid = fork { sleep 1; exit }
|
||||
pid = fork { sleep 2; exit }
|
||||
Thread.start { raise }
|
||||
Process.wait pid
|
||||
5.times do
|
||||
sleep 1
|
||||
break unless signal_received.empty?
|
||||
end
|
||||
assert_equal [true], signal_received, " [ruby-core:19744]"
|
||||
rescue NotImplementedError, ArgumentError
|
||||
ensure
|
||||
|
|
Loading…
Add table
Reference in a new issue