diff options
author | Carl C. Trieloff <cctrieloff@apache.org> | 2009-01-19 19:25:29 +0000 |
---|---|---|
committer | Carl C. Trieloff <cctrieloff@apache.org> | 2009-01-19 19:25:29 +0000 |
commit | ed225bc299b42194e49a7d8451849e1ea99b2a25 (patch) | |
tree | 793e77d68ec4bf9a95a54d0f72ade7c76d16ca84 /qpid/cpp/src/tests/QueueTest.cpp | |
parent | 0269fb662e844aa90ec659288fde3cd86643e6e4 (diff) | |
download | qpid-python-ed225bc299b42194e49a7d8451849e1ea99b2a25.tar.gz |
Put messages into LVQ FIFO if no key is specified.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@735776 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/QueueTest.cpp')
-rw-r--r-- | qpid/cpp/src/tests/QueueTest.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/QueueTest.cpp b/qpid/cpp/src/tests/QueueTest.cpp index f1771e26cd..dee6de83a7 100644 --- a/qpid/cpp/src/tests/QueueTest.cpp +++ b/qpid/cpp/src/tests/QueueTest.cpp @@ -356,6 +356,30 @@ QPID_AUTO_TEST_CASE(testLVQOrdering){ } +QPID_AUTO_TEST_CASE(testLVQEmptyKey){ + + client::QueueOptions args; + // set queue mode + args.setOrdering(client::LVQ); + + Queue::shared_ptr queue(new Queue("my-queue", true )); + queue->configure(args); + + intrusive_ptr<Message> msg1 = create_message("e", "A"); + intrusive_ptr<Message> msg2 = create_message("e", "B"); + + string key; + args.getLVQKey(key); + BOOST_CHECK_EQUAL(key, "qpid.LVQ_key"); + + + msg1->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a"); + queue->deliver(msg1); + queue->deliver(msg2); + BOOST_CHECK_EQUAL(queue->getMessageCount(), 2u); + +} + QPID_AUTO_TEST_CASE(testLVQAcquire){ client::QueueOptions args; |