activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1338687 - /activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
Date Tue, 15 May 2012 13:14:14 GMT
Author: tabish
Date: Tue May 15 13:14:13 2012
New Revision: 1338687

URL: http://svn.apache.org/viewvc?rev=1338687&view=rev
Log:
Fix memory leaks in the test case

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp?rev=1338687&r1=1338686&r2=1338687&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
Tue May 15 13:14:13 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