From 1ce91a21e53358cfdb88203a7d00f9e99c4f5487 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 25 Jul 2008 13:50:32 +0000 Subject: Only reduce count and size maintained for queue plicy when messages are actually dequeued (i.e. acked). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@679805 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/QueueTest.cpp | 8 ++++---- cpp/src/tests/TxPublishTest.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'cpp/src/tests') diff --git a/cpp/src/tests/QueueTest.cpp b/cpp/src/tests/QueueTest.cpp index 39696707f4..20b3d90eb6 100644 --- a/cpp/src/tests/QueueTest.cpp +++ b/cpp/src/tests/QueueTest.cpp @@ -91,7 +91,7 @@ QPID_AUTO_TEST_CASE(testAsyncMessage) { BOOST_CHECK(!c1.received); msg1->enqueueComplete(); - received = queue->dequeue().payload; + received = queue->get().payload; BOOST_CHECK_EQUAL(msg1.get(), received.get()); } @@ -179,11 +179,11 @@ QPID_AUTO_TEST_CASE(testDequeue){ BOOST_CHECK_EQUAL(uint32_t(3), queue->getMessageCount()); - received = queue->dequeue().payload; + received = queue->get().payload; BOOST_CHECK_EQUAL(msg1.get(), received.get()); BOOST_CHECK_EQUAL(uint32_t(2), queue->getMessageCount()); - received = queue->dequeue().payload; + received = queue->get().payload; BOOST_CHECK_EQUAL(msg2.get(), received.get()); BOOST_CHECK_EQUAL(uint32_t(1), queue->getMessageCount()); @@ -196,7 +196,7 @@ QPID_AUTO_TEST_CASE(testDequeue){ BOOST_CHECK_EQUAL(msg3.get(), consumer.last.get()); BOOST_CHECK_EQUAL(uint32_t(0), queue->getMessageCount()); - received = queue->dequeue().payload; + received = queue->get().payload; BOOST_CHECK(!received); BOOST_CHECK_EQUAL(uint32_t(0), queue->getMessageCount()); diff --git a/cpp/src/tests/TxPublishTest.cpp b/cpp/src/tests/TxPublishTest.cpp index 5c4686c905..9e9715c987 100644 --- a/cpp/src/tests/TxPublishTest.cpp +++ b/cpp/src/tests/TxPublishTest.cpp @@ -82,13 +82,13 @@ QPID_AUTO_TEST_CASE(testCommit) t.op.prepare(0); t.op.commit(); BOOST_CHECK_EQUAL((uint32_t) 1, t.queue1->getMessageCount()); - intrusive_ptr msg_dequeue = t.queue1->dequeue().payload; + intrusive_ptr msg_dequeue = t.queue1->get().payload; BOOST_CHECK_EQUAL( true, (static_pointer_cast(msg_dequeue))->isEnqueueComplete()); BOOST_CHECK_EQUAL(t.msg, msg_dequeue); BOOST_CHECK_EQUAL((uint32_t) 1, t.queue2->getMessageCount()); - BOOST_CHECK_EQUAL(t.msg, t.queue2->dequeue().payload); + BOOST_CHECK_EQUAL(t.msg, t.queue2->get().payload); } QPID_AUTO_TEST_SUITE_END() -- cgit v1.2.1