diff options
author | Gordon Sim <gsim@apache.org> | 2010-04-06 19:08:28 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2010-04-06 19:08:28 +0000 |
commit | cea30bd45679ae39de64cb93e25d914abc937ba0 (patch) | |
tree | be972f36e5abea1b17bf5cd85fba403f6f934eaa /cpp/src/tests | |
parent | 4517306f15bb760814a75797f4b229132114ff6d (diff) | |
download | qpid-python-cea30bd45679ae39de64cb93e25d914abc937ba0.tar.gz |
QPID-664: added method to release messages
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931275 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rw-r--r-- | cpp/src/tests/MessagingSessionTests.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cpp/src/tests/MessagingSessionTests.cpp b/cpp/src/tests/MessagingSessionTests.cpp index e1c0a6bb16..6341ef3f28 100644 --- a/cpp/src/tests/MessagingSessionTests.cpp +++ b/cpp/src/tests/MessagingSessionTests.cpp @@ -857,6 +857,21 @@ QPID_AUTO_TEST_CASE(testTx) BOOST_CHECK(!receiver2.fetch(in, Duration::IMMEDIATE)); } +QPID_AUTO_TEST_CASE(testRelease) +{ + QueueFixture fix; + Sender sender = fix.session.createSender(fix.queue); + Message out("test-message"); + sender.send(out, true); + Receiver receiver = fix.session.createReceiver(fix.queue); + Message m1 = receiver.fetch(Duration::IMMEDIATE); + fix.session.release(m1); + Message m2 = receiver.fetch(Duration::SECOND * 1); + BOOST_CHECK_EQUAL(m1.getContent(), out.getContent()); + BOOST_CHECK_EQUAL(m1.getContent(), m2.getContent()); + fix.session.acknowledge(true); +} + QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests |