]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Updates tearDown() to release instance objects
authorIryoung Jeong <iryoung@gmail.com>
Thu, 22 Nov 2012 03:58:47 +0000 (12:58 +0900)
committerIryoung Jeong <iryoung@gmail.com>
Thu, 22 Nov 2012 19:41:14 +0000 (04:41 +0900)
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

quantum/tests/unit/test_db_plugin.py

index a2c9b2f62f5248036932bbefa98a740e98bcba1b..339e7c07ba1b59aef093d407b114201d39c35259 100644 (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()