qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1532310 - /qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp
Date Tue, 15 Oct 2013 12:42:14 GMT
Author: gsim
Date: Tue Oct 15 12:42:14 2013
New Revision: 1532310

URL: http://svn.apache.org/r1532310
Log:
QPID-5227: QPID-5230: added tests for redelivered flag on browse and release

Modified:
    qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp

Modified: qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp?rev=1532310&r1=1532309&r2=1532310&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp Tue Oct 15 12:42:14 2013
@@ -397,6 +397,14 @@ QPID_AUTO_TEST_CASE(testBrowse)
     receive(browser1, 10);
     Receiver browser2 = fix.session.createReceiver(fix.queue + "; {mode:browse}");
     receive(browser2, 10);
+    Receiver releaser1 = fix.session.createReceiver(fix.queue);
+    Message m1 = releaser1.fetch(messaging::Duration::SECOND*5);
+    BOOST_CHECK(!m1.getRedelivered());
+    fix.session.release(m1);
+    Receiver releaser2 = fix.session.createReceiver(fix.queue);
+    Message m2 = releaser2.fetch(messaging::Duration::SECOND*5);
+    BOOST_CHECK(m2.getRedelivered());
+    fix.session.release(m2);
     Receiver consumer = fix.session.createReceiver(fix.queue);
     receive(consumer, 10);
     fix.session.acknowledge();
@@ -738,6 +746,7 @@ QPID_AUTO_TEST_CASE(testRelease)
     Message m2 = receiver.fetch(Duration::SECOND * 1);
     BOOST_CHECK_EQUAL(m1.getContent(), out.getContent());
     BOOST_CHECK_EQUAL(m1.getContent(), m2.getContent());
+    BOOST_CHECK(m2.getRedelivered());
     fix.session.acknowledge(true);
 }
 



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


Mime
View raw message