activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r723888 - in /activemq/activemq-cpp/trunk/src/test-integration/activemq: test/DurableTest.cpp test/SimpleTest.cpp util/CMSProvider.cpp
Date Fri, 05 Dec 2008 22:00:01 GMT
Author: tabish
Date: Fri Dec  5 14:00:00 2008
New Revision: 723888

URL: http://svn.apache.org/viewvc?rev=723888&view=rev
Log:
Update integration test CMSProvider class to attempt to remove the Topics and Queue that it
creates.

Modified:
    activemq/activemq-cpp/trunk/src/test-integration/activemq/test/DurableTest.cpp
    activemq/activemq-cpp/trunk/src/test-integration/activemq/test/SimpleTest.cpp
    activemq/activemq-cpp/trunk/src/test-integration/activemq/util/CMSProvider.cpp

Modified: activemq/activemq-cpp/trunk/src/test-integration/activemq/test/DurableTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-integration/activemq/test/DurableTest.cpp?rev=723888&r1=723887&r2=723888&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-integration/activemq/test/DurableTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test-integration/activemq/test/DurableTest.cpp Fri Dec
 5 14:00:00 2008
@@ -43,8 +43,6 @@
         cmsProvider->setDurable( true );
         cms::MessageConsumer* consumer = cmsProvider->getConsumer();
         cms::MessageProducer* producer = cmsProvider->getProducer();
-        //CMSListener listener( session );
-        //consumer->setMessageListener( &listener );
 
         // Send a text message to the consumer while its active
         auto_ptr<cms::TextMessage> txtMessage( session->createTextMessage( "TEST
MESSAGE" ) );

Modified: activemq/activemq-cpp/trunk/src/test-integration/activemq/test/SimpleTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-integration/activemq/test/SimpleTest.cpp?rev=723888&r1=723887&r2=723888&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-integration/activemq/test/SimpleTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test-integration/activemq/test/SimpleTest.cpp Fri Dec
 5 14:00:00 2008
@@ -222,6 +222,15 @@
 
         message.reset( consumer2->receive( 2000 ) );
         CPPUNIT_ASSERT( message.get() != NULL );
+
+        // Clean up if we can
+        consumer1->close();
+        consumer2->close();
+        producer->close();
+        session1->close();
+        session2->close();
+
+        this->cmsProvider->destroyDestination( topic.get() );
     }
     AMQ_CATCH_RETHROW( ActiveMQException )
     AMQ_CATCHALL_THROW( ActiveMQException )
@@ -253,6 +262,15 @@
 
         message.reset( consumer2->receive( 2000 ) );
         CPPUNIT_ASSERT( message.get() != NULL );
+
+        // Clean up if we can
+        consumer1->close();
+        consumer2->close();
+        producer->close();
+        session1->close();
+        session2->close();
+
+        this->cmsProvider->destroyDestination( topic.get() );
     }
     AMQ_CATCH_RETHROW( ActiveMQException )
     AMQ_CATCHALL_THROW( ActiveMQException )
@@ -283,6 +301,13 @@
 
         auto_ptr<cms::Message> message( consumer->receive( 2000 ) );
         CPPUNIT_ASSERT( message.get() != NULL );
+
+        // Clean up if we can
+        consumer->close();
+        producer->close();
+        session->close();
+
+        this->cmsProvider->destroyDestination( topic.get() );
     }
     AMQ_CATCH_RETHROW( ActiveMQException )
     AMQ_CATCHALL_THROW( ActiveMQException )

Modified: activemq/activemq-cpp/trunk/src/test-integration/activemq/util/CMSProvider.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-integration/activemq/util/CMSProvider.cpp?rev=723888&r1=723887&r2=723888&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-integration/activemq/util/CMSProvider.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test-integration/activemq/util/CMSProvider.cpp Fri Dec
 5 14:00:00 2008
@@ -21,6 +21,7 @@
 
 #include <activemq/exceptions/ActiveMQException.h>
 #include <activemq/core/ActiveMQConnection.h>
+#include <activemq/util/IntegrationCommon.h>
 
 #include <decaf/util/UUID.h>
 #include <decaf/lang/exceptions/IllegalStateException.h>
@@ -393,7 +394,9 @@
         try{
             amqConnection->destroyDestination( destination );
         } catch( decaf::lang::Exception& ex ) {
-            ex.printStackTrace();
+            if( IntegrationCommon::debug ) {
+                ex.printStackTrace();
+            }
         } catch( ... ) {
         }
     }



Mime
View raw message