Merge "Add check that factory started in dispose"

This commit is contained in:
Jenkins 2016-07-12 01:21:19 +00:00 committed by Gerrit Code Review
commit 681d64026b

View File

@ -107,6 +107,9 @@ def get_engine():
def dispose(): def dispose():
# TODO(akamyshnikova): Use context_manager.dispose_pool() when it is
# available in oslo.db
if context_manager._factory._started:
get_engine().pool.dispose() get_engine().pool.dispose()