summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/ClientSessionTest.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2009-06-08 17:39:24 +0000
committerGordon Sim <gsim@apache.org>2009-06-08 17:39:24 +0000
commit0f979c0b50d1c295f0e966236dc4e5aa902f6af2 (patch)
tree6dffc6f76b29960d44477b19ee7b61cc78e884c1 /qpid/cpp/src/tests/ClientSessionTest.cpp
parent44a6cdef4928bbc2667be69efd15fb203975aea7 (diff)
downloadqpid-python-0f979c0b50d1c295f0e966236dc4e5aa902f6af2.tar.gz
If expiration is already set, don't alter it.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@782712 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/ClientSessionTest.cpp')
-rw-r--r--qpid/cpp/src/tests/ClientSessionTest.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/ClientSessionTest.cpp b/qpid/cpp/src/tests/ClientSessionTest.cpp
index c82cb77e95..7a6373ac17 100644
--- a/qpid/cpp/src/tests/ClientSessionTest.cpp
+++ b/qpid/cpp/src/tests/ClientSessionTest.cpp
@@ -590,6 +590,20 @@ QPID_AUTO_TEST_CASE(testSessionIsValid) {
BOOST_CHECK(!session.isValid());
}
+QPID_AUTO_TEST_CASE(testExpirationNotAltered) {
+ ClientSessionFixture fix;
+ fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true);
+
+ Message m("my-message", "my-queue");
+ m.getDeliveryProperties().setTtl(60000);
+ m.getDeliveryProperties().setExpiration(12345);
+ fix.session.messageTransfer(arg::content=m);
+ Message got;
+ BOOST_CHECK(fix.subs.get(got, "my-queue"));
+ BOOST_CHECK_EQUAL("my-message", got.getData());
+ BOOST_CHECK_EQUAL(12345u, got.getDeliveryProperties().getExpiration());
+}
+
QPID_AUTO_TEST_SUITE_END()