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
Родитель 41c199130a
Коммит 8c8796333a
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

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