diff --git a/nova/tests/functional/api/openstack/placement/fixtures.py b/nova/tests/functional/api/openstack/placement/fixtures.py index 899289847..2b71be884 100644 --- a/nova/tests/functional/api/openstack/placement/fixtures.py +++ b/nova/tests/functional/api/openstack/placement/fixtures.py @@ -84,10 +84,12 @@ class APIFixture(fixture.GabbiFixture): self.api_db_fixture.cleanup() self.main_db_fixture.cleanup() - # NOTE(sbauza): Since we clean up the DB, we need to also reset the - # traits sync flag for making sure that next run will recreate the - # traits. + # Since we clean up the DB, we need to reset the traits sync + # flag to make sure the next run will recreate the traits and + # reset the _RC_CACHE so that any cached resource classes + # are flushed. objects.resource_provider._TRAITS_SYNCED = False + objects.resource_provider._RC_CACHE = None self.output_stream_fixture.cleanUp() self.standard_logging_fixture.cleanUp()