summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-06-12 17:17:13 -0400
committerRussell Bryant <rbryant@redhat.com>2012-06-13 09:13:31 -0400
commit341ae3b475f9aab85c9202995529b1d041a71b2b (patch)
tree89079a48a601871941dd4a977f35c773324c0d32 /tests
parentcb0a0497e896634243a0e0a03da54e807bed0b46 (diff)
downloadoslo-341ae3b475f9aab85c9202995529b1d041a71b2b.tar.gz
oslo-341ae3b475f9aab85c9202995529b1d041a71b2b.tar.xz
oslo-341ae3b475f9aab85c9202995529b1d041a71b2b.zip
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: I446530239e16701009c4db8407a344596bb17952
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/rpc/test_qpid.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/unit/rpc/test_qpid.py b/tests/unit/rpc/test_qpid.py
index b753c22..a7526c5 100644
--- a/tests/unit/rpc/test_qpid.py
+++ b/tests/unit/rpc/test_qpid.py
@@ -307,6 +307,7 @@ class RpcQpidTestCase(unittest.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)
@@ -314,16 +315,19 @@ class RpcQpidTestCase(unittest.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)