summaryrefslogtreecommitdiff
path: root/cpp/src/tests/QueueTest.cpp
diff options
context:
space:
mode:
authorCarl C. Trieloff <cctrieloff@apache.org>2008-12-17 21:26:55 +0000
committerCarl C. Trieloff <cctrieloff@apache.org>2008-12-17 21:26:55 +0000
commitc146f7f3af6ecac234498102e97175927347bd71 (patch)
treef202d3ceee5d631c32db27cdda9a38ca2c149e65 /cpp/src/tests/QueueTest.cpp
parent27c83f981b62cbff3aa4d5910acca4e0c68ec165 (diff)
downloadqpid-python-c146f7f3af6ecac234498102e97175927347bd71.tar.gz
options name re-name to be more explicit & better test
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@727517 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/QueueTest.cpp')
-rw-r--r--cpp/src/tests/QueueTest.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/cpp/src/tests/QueueTest.cpp b/cpp/src/tests/QueueTest.cpp
index fcd46da318..4d1de64180 100644
--- a/cpp/src/tests/QueueTest.cpp
+++ b/cpp/src/tests/QueueTest.cpp
@@ -43,7 +43,7 @@ public:
intrusive_ptr<Message> last;
bool received;
- TestConsumer(): received(false) {};
+ TestConsumer(bool acquire = true):Consumer(acquire), received(false) {};
virtual bool deliver(QueuedMessage& msg){
last = msg.payload;
@@ -384,7 +384,7 @@ QPID_AUTO_TEST_CASE(testLVQAcquire){
msg3->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"c");
msg4->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
msg5->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"b");
- msg6->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
+ msg6->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"c");
//enqueue 4 message
queue->deliver(msg1);
@@ -406,12 +406,17 @@ QPID_AUTO_TEST_CASE(testLVQAcquire){
queue->deliver(msg5);
BOOST_CHECK_EQUAL(queue->getMessageCount(), 3u);
- // set mode to no acquire and check
- args.setOrdering(client::LVQ_NO_ACQUIRE);
+ // set mode to no browse and check
+ args.setOrdering(client::LVQ_NO_BROWSE);
queue->configure(args);
+ TestConsumer::shared_ptr c1(new TestConsumer(false));
+
+ queue->dispatch(c1);
+ queue->dispatch(c1);
+ queue->dispatch(c1);
+
queue->deliver(msg6);
BOOST_CHECK_EQUAL(queue->getMessageCount(), 3u);
-
}
QPID_AUTO_TEST_CASE(testLVQMultiQueue){