qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1535048 - in /qpid/trunk/qpid: cpp/src/qpid/broker/amqp/Header.cpp tests/src/py/qpid_tests/broker_1_0/general.py
Date Wed, 23 Oct 2013 15:04:04 GMT
Author: gsim
Date: Wed Oct 23 15:04:04 2013
New Revision: 1535048

URL: http://svn.apache.org/r1535048
Log:
QPID-5253: fix delivery count for browsed 1.0 message

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Header.cpp
    qpid/trunk/qpid/tests/src/py/qpid_tests/broker_1_0/general.py

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Header.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Header.cpp?rev=1535048&r1=1535047&r2=1535048&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Header.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/amqp/Header.cpp Wed Oct 23 15:04:04 2013
@@ -56,7 +56,7 @@ bool Header::isFirstAcquirer() const
 
 uint32_t Header::getDeliveryCount() const
 {
-    return message.getDeliveryCount();
+    return message.isRedelivered() ? message.getDeliveryCount() : 0;
 }
 
 Header::Header(const qpid::broker::Message& m) : message(m) {}

Modified: qpid/trunk/qpid/tests/src/py/qpid_tests/broker_1_0/general.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tests/src/py/qpid_tests/broker_1_0/general.py?rev=1535048&r1=1535047&r2=1535048&view=diff
==============================================================================
--- qpid/trunk/qpid/tests/src/py/qpid_tests/broker_1_0/general.py (original)
+++ qpid/trunk/qpid/tests/src/py/qpid_tests/broker_1_0/general.py Wed Oct 23 15:04:04 2013
@@ -57,6 +57,9 @@ class GeneralTests (VersionTest):
         for expected in msgs:
             msg = rcv.fetch(0)
             assert msg.content == expected.content
+            try:
+                assert msg.properties.get('x-amqp-delivery-count') == 0, (msg.properties.get('x-amqp-delivery-count'))
+            except KeyError, e: None #default is 0
             self.ssn.acknowledge(msg)
         rcv.close()
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message