activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1339412 - /activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
Date Wed, 16 May 2012 22:53:59 GMT
Author: tabish
Date: Wed May 16 22:53:59 2012
New Revision: 1339412

URL: http://svn.apache.org/viewvc?rev=1339412&view=rev
Log:
Fix leaky test case

Modified:
    activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp?rev=1339412&r1=1339411&r2=1339412&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
Wed May 16 22:53:59 2012
@@ -122,8 +122,8 @@ void OpenwireJmsRecoverTest::doTestSynch
 
     std::auto_ptr<MessageProducer> producer(session->createProducer(destination));
     producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
-    producer->send(session->createTextMessage("First"));
-    producer->send(session->createTextMessage("Second"));
+    producer->send(std::auto_ptr<cms::Message>(session->createTextMessage("First")).get());
+    producer->send(std::auto_ptr<cms::Message>(session->createTextMessage("Second")).get());
 
     std::auto_ptr<TextMessage> message(dynamic_cast<TextMessage*>(consumer->receive(2000)));
     CPPUNIT_ASSERT_EQUAL(string("First"), message->getText());
@@ -207,8 +207,8 @@ void OpenwireJmsRecoverTest::doTestAsync
 
     std::auto_ptr<MessageProducer> producer(session->createProducer(destination));
     producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
-    producer->send(session->createTextMessage("First"));
-    producer->send(session->createTextMessage("Second"));
+    producer->send(std::auto_ptr<cms::Message>(session->createTextMessage("First")).get());
+    producer->send(std::auto_ptr<cms::Message>(session->createTextMessage("Second")).get());
 
     ClientAckMessageListener listener(session.get(), &errorMessages, &doneCountDownLatch);
     consumer->setMessageListener(&listener);
@@ -286,8 +286,8 @@ void OpenwireJmsRecoverTest::doTestAsync
 
     std::auto_ptr<MessageProducer> producer(session->createProducer(destination));
     producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
-    producer->send(session->createTextMessage("First"));
-    producer->send(session->createTextMessage("Second"));
+    producer->send(std::auto_ptr<cms::Message>(session->createTextMessage("First")).get());
+    producer->send(std::auto_ptr<cms::Message>(session->createTextMessage("Second")).get());
 
     AutoAckMessageListener listener(session.get(), &errorMessages, &doneCountDownLatch);
     consumer->setMessageListener(&listener);



Mime
View raw message