summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-06-12 17:07:18 -0400
committerRussell Bryant <rbryant@redhat.com>2012-06-13 09:11:45 -0400
commitd15f3034dfab05ef0ec02b4e353b3dfa1512db35 (patch)
treef40b18262abac99fd888f000ced91bf7407e9d3b /nova/tests
parent9e0c6845562dcd8e294841ac06aad559247de0cf (diff)
Add missing ack to impl_qpid.
Fix bug 1012374. Johannes Erdfelt pointed out that impl_qpid wasn't acking messages that it received. This turned out to be a nasty oversight, resulting in unbounded message queue growth inside of the python-qpid library. This fixes it. Change-Id: I0370293807f0282e1dbdd59246f70be031e888a9
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/rpc/test_qpid.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/tests/rpc/test_qpid.py b/nova/tests/rpc/test_qpid.py
index 1b21158f8..b8553873b 100644
--- a/nova/tests/rpc/test_qpid.py
+++ b/nova/tests/rpc/test_qpid.py
@@ -296,6 +296,7 @@ class RpcQpidTestCase(test.TestCase):
self.mock_receiver)
self.mock_receiver.fetch().AndReturn(qpid.messaging.Message(
{"result": "foo", "failure": False, "ending": False}))
+ self.mock_session.acknowledge(mox.IgnoreArg())
if multi:
self.mock_session.next_receiver(timeout=mox.IsA(int)).AndReturn(
self.mock_receiver)
@@ -303,16 +304,19 @@ class RpcQpidTestCase(test.TestCase):
qpid.messaging.Message(
{"result": "bar", "failure": False,
"ending": False}))
+ self.mock_session.acknowledge(mox.IgnoreArg())
self.mock_session.next_receiver(timeout=mox.IsA(int)).AndReturn(
self.mock_receiver)
self.mock_receiver.fetch().AndReturn(
qpid.messaging.Message(
{"result": "baz", "failure": False,
"ending": False}))
+ self.mock_session.acknowledge(mox.IgnoreArg())
self.mock_session.next_receiver(timeout=mox.IsA(int)).AndReturn(
self.mock_receiver)
self.mock_receiver.fetch().AndReturn(qpid.messaging.Message(
{"failure": False, "ending": True}))
+ self.mock_session.acknowledge(mox.IgnoreArg())
self.mock_session.close()
self.mock_connection.session().AndReturn(self.mock_session)