1
0
Fork 0
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:
naruse 2010-11-15 09:09:39 +00:00
parent b73d1fbd25
commit cb2235c112

View file

@ -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