summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/tests/rpc/test_qpid.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/tests/rpc/test_qpid.py b/nova/tests/rpc/test_qpid.py
index b08c7b96d..0417674b8 100644
--- a/nova/tests/rpc/test_qpid.py
+++ b/nova/tests/rpc/test_qpid.py
@@ -186,7 +186,7 @@ class RpcQpidTestCase(test.TestCase):
self.mocker.VerifyAll()
finally:
- if rpc_amqp.ConnectionContext._connection_pool.free():
+ while rpc_amqp.ConnectionContext._connection_pool.free_items:
# Pull the mock connection object out of the connection pool so
# that it doesn't mess up other test cases.
rpc_amqp.ConnectionContext._connection_pool.get()
@@ -261,7 +261,7 @@ class RpcQpidTestCase(test.TestCase):
self.mocker.VerifyAll()
finally:
- if rpc_amqp.ConnectionContext._connection_pool.free():
+ while rpc_amqp.ConnectionContext._connection_pool.free_items:
# Pull the mock connection object out of the connection pool so
# that it doesn't mess up other test cases.
rpc_amqp.ConnectionContext._connection_pool.get()