Updates tearDown() to release instance objects

This change fixes the bug by releasing the objects of the instance
of class QuantumDbPluginV2TestCase. Removing unnecessary objects
explicitly reduces the memory required by unit tests.

Fixes bug 1065276

Change-Id: Ia003a7718e1aedc4e4c8fb02b723f4a511ebc319
This commit is contained in:
Iryoung Jeong 2012-11-22 12:58:47 +09:00
parent f562c49fe8
commit 1e4c6cf798

View File

@ -112,6 +112,10 @@ class QuantumDbPluginV2TestCase(unittest2.TestCase):
def tearDown(self):
super(QuantumDbPluginV2TestCase, self).tearDown()
self.api = None
self._deserializers = None
self._skip_native_bulk = None
self.ext_api = None
# NOTE(jkoelker) for a 'pluggable' framework, Quantum sure
# doesn't like when the plugin changes ;)
db.clear_db()