1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Wait until the callback is called with timeout.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-04-09 10:49:46 +00:00
parent 41c199130a
commit 8c8796333a

View file

@ -351,9 +351,12 @@ __EOS__
ssl.connect
last_client_session = ssl.session
ssl.close
Thread.pass # try to ensure server calls callbacks
assert(called.delete(:new))
assert(called.delete(:remove))
timeout(5) do
Thread.pass until called.key?(:new)
assert(called.delete(:new))
Thread.pass until called.key?(:remove)
assert(called.delete(:remove))
end
end
end
assert(called[:get1])