diff options
| author | Todd Willey <todd@ansolabs.com> | 2011-05-31 16:20:35 -0400 |
|---|---|---|
| committer | Todd Willey <todd@ansolabs.com> | 2011-05-31 16:20:35 -0400 |
| commit | eca6c3098144c1bf917725d906a50141a5aaef4e (patch) | |
| tree | 2ee52158c2c6ca49f6675359b1977bc53ca72621 /nova/test.py | |
| parent | 4d7dbdc96e30afbd19ab525e9667f6e3aaaafbe9 (diff) | |
| parent | 0b7104a8c6b2b2e3fed4a09b239439964aeb2774 (diff) | |
Merge Trunk.
Diffstat (limited to 'nova/test.py')
| -rw-r--r-- | nova/test.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nova/test.py b/nova/test.py index 4deb2a175..80b2d0a74 100644 --- a/nova/test.py +++ b/nova/test.py @@ -31,17 +31,15 @@ import uuid import unittest import mox -import shutil import stubout from eventlet import greenthread -from nova import context -from nova import db from nova import fakerabbit from nova import flags from nova import rpc from nova import service from nova import wsgi +from nova.virt import fake FLAGS = flags.FLAGS @@ -85,6 +83,7 @@ class TestCase(unittest.TestCase): self._monkey_patch_attach() self._monkey_patch_wsgi() self._original_flags = FLAGS.FlagValuesDict() + rpc.ConnectionPool = rpc.Pool(max_size=FLAGS.rpc_conn_pool_size) def tearDown(self): """Runs after each test method to tear down test environment.""" @@ -99,6 +98,10 @@ class TestCase(unittest.TestCase): if FLAGS.fake_rabbit: fakerabbit.reset_all() + if FLAGS.connection_type == 'fake': + if hasattr(fake.FakeConnection, '_instance'): + del fake.FakeConnection._instance + # Reset any overriden flags self.reset_flags() |
