diff options
| author | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-05-27 07:31:29 -0700 |
|---|---|---|
| committer | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-05-27 07:31:29 -0700 |
| commit | ceb6eee5ddbbd202af80ae32795bbf53d2e9ef49 (patch) | |
| tree | 9cf90f9db1d5e563c5326c96d2d34e76a879d7a8 /nova/test.py | |
| parent | 3f911877a2a9facdf153f173b3fb76a18e44a2ac (diff) | |
| parent | a7c36f68793a7db454d344187d4596ebecc8ade0 (diff) | |
| download | nova-ceb6eee5ddbbd202af80ae32795bbf53d2e9ef49.tar.gz nova-ceb6eee5ddbbd202af80ae32795bbf53d2e9ef49.tar.xz nova-ceb6eee5ddbbd202af80ae32795bbf53d2e9ef49.zip | |
trunk merge
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() |
