Merge "Reset global wsgi app state in unit test"
This commit is contained in:
commit
16562b0ab0
|
@ -53,6 +53,7 @@ from oslotest import mock_fixture
|
||||||
from sqlalchemy.dialects import sqlite
|
from sqlalchemy.dialects import sqlite
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
|
from nova.api.openstack import wsgi_app
|
||||||
from nova.compute import rpcapi as compute_rpcapi
|
from nova.compute import rpcapi as compute_rpcapi
|
||||||
from nova import context
|
from nova import context
|
||||||
from nova.db.sqlalchemy import api as sqlalchemy_api
|
from nova.db.sqlalchemy import api as sqlalchemy_api
|
||||||
|
@ -284,6 +285,10 @@ class TestCase(base.BaseTestCase):
|
||||||
|
|
||||||
self.useFixture(nova_fixtures.GenericPoisonFixture())
|
self.useFixture(nova_fixtures.GenericPoisonFixture())
|
||||||
|
|
||||||
|
# make sure that the wsgi app is fully initialized for all testcase
|
||||||
|
# instead of only once initialized for test worker
|
||||||
|
wsgi_app.init_global_data.reset()
|
||||||
|
|
||||||
def _setup_cells(self):
|
def _setup_cells(self):
|
||||||
"""Setup a normal cellsv2 environment.
|
"""Setup a normal cellsv2 environment.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue