You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jr...@apache.org on 2013/04/23 23:28:36 UTC
svn commit: r1471150 - in /qpid/trunk/qpid/python/qpid:
messaging/endpoints.py tests/messaging/endpoints.py
Author: jross
Date: Tue Apr 23 21:28:35 2013
New Revision: 1471150
URL: http://svn.apache.org/r1471150
Log:
QPID-4140: Use the session.acked list to determine the number of unsettled messages; a patch from Ernie Allen
Modified:
qpid/trunk/qpid/python/qpid/messaging/endpoints.py
qpid/trunk/qpid/python/qpid/tests/messaging/endpoints.py
Modified: qpid/trunk/qpid/python/qpid/messaging/endpoints.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging/endpoints.py?rev=1471150&r1=1471149&r2=1471150&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging/endpoints.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging/endpoints.py Tue Apr 23 21:28:35 2013
@@ -988,7 +988,7 @@ class Receiver(Endpoint, object):
"""
Returns the number of acknowledged messages awaiting confirmation.
"""
- return len([m for m in self.acked if m._receiver is self])
+ return len([m for m in self.session.acked if m._receiver is self])
@synchronized
def available(self):
Modified: qpid/trunk/qpid/python/qpid/tests/messaging/endpoints.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/tests/messaging/endpoints.py?rev=1471150&r1=1471149&r2=1471150&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/tests/messaging/endpoints.py (original)
+++ qpid/trunk/qpid/python/qpid/tests/messaging/endpoints.py Tue Apr 23 21:28:35 2013
@@ -890,7 +890,10 @@ class ReceiverTests(Base):
self.assertEmpty(rb2)
self.drain(self.rcv, expected=[])
- # XXX: need testUnsettled()
+ def testUnsettled(self):
+ # just tests the code path and not the value
+ rcv = self.ssn.receiver('test-receiver-unsettled-queue; {create: always, delete: always}')
+ rcv.unsettled()
def unreliabilityTest(self, mode="unreliable"):
msgs = [self.message("testUnreliable", i) for i in range(3)]
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org