From 341ae3b475f9aab85c9202995529b1d041a71b2b Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 12 Jun 2012 17:17:13 -0400 Subject: 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 --- tests/unit/rpc/test_qpid.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/unit') 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) -- cgit