From f2d0f0cfbfebb082e92f28b8d1b2987a0f20acf6 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 6 Dec 2006 17:51:42 +0000 Subject: Allow non-durable messages to be lazy-loaded. Cleanup of lazy-loaded messages that are never enqueued. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@483165 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/tests/TxPublishTest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cpp/tests/TxPublishTest.cpp') diff --git a/cpp/tests/TxPublishTest.cpp b/cpp/tests/TxPublishTest.cpp index 6324e5fb01..d33d84ec6e 100644 --- a/cpp/tests/TxPublishTest.cpp +++ b/cpp/tests/TxPublishTest.cpp @@ -38,11 +38,11 @@ class TxPublishTest : public CppUnit::TestCase class TestMessageStore : public NullMessageStore { public: - vector< pair > enqueued; + vector< pair > enqueued; - void enqueue(TransactionContext*, Message::shared_ptr& msg, const Queue& queue, const string * const /*xid*/) + void enqueue(TransactionContext*, Message* const msg, const Queue& queue, const string * const /*xid*/) { - enqueued.push_back(pair(queue.getName(),msg)); + enqueued.push_back(pair(queue.getName(),msg)); } //dont care about any of the other methods: @@ -59,7 +59,7 @@ class TxPublishTest : public CppUnit::TestCase TestMessageStore store; Queue::shared_ptr queue1; Queue::shared_ptr queue2; - Message::shared_ptr msg; + Message::shared_ptr const msg; TxPublish op; @@ -82,9 +82,9 @@ public: op.prepare(0); CPPUNIT_ASSERT_EQUAL((size_t) 2, store.enqueued.size()); CPPUNIT_ASSERT_EQUAL(string("queue1"), store.enqueued[0].first); - CPPUNIT_ASSERT_EQUAL(msg, store.enqueued[0].second); + CPPUNIT_ASSERT_EQUAL(msg.get(), store.enqueued[0].second); CPPUNIT_ASSERT_EQUAL(string("queue2"), store.enqueued[1].first); - CPPUNIT_ASSERT_EQUAL(msg, store.enqueued[1].second); + CPPUNIT_ASSERT_EQUAL(msg.get(), store.enqueued[1].second); } void testCommit() -- cgit v1.2.1