activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r519648 - /activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h
Date Sun, 18 Mar 2007 17:52:20 GMT
Author: nmittler
Date: Sun Mar 18 10:52:19 2007
New Revision: 519648

URL: http://svn.apache.org/viewvc?view=rev&rev=519648
Log:
fixing broken unit test: ActiveMQConnectionTest.test

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h?view=diff&rev=519648&r1=519647&r2=519648
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h
Sun Mar 18 10:52:19 2007
@@ -215,21 +215,21 @@
 
                 consumerListener->onConsumerMessage( &consumer, cmd );
 
-                CPPUNIT_ASSERT( msgListener.messages.size() == 1 );
+                CPPUNIT_ASSERT_EQUAL( 1, (int)msgListener.messages.size() );
 
                 connection.removeDispatcher( &consumer );
 
                 msgListener.messages.clear();
                 consumerListener->onConsumerMessage( &consumer, cmd );
 
-                CPPUNIT_ASSERT( msgListener.messages.size() == 0 );
+                CPPUNIT_ASSERT_EQUAL( 0, (int)msgListener.messages.size() );
 
                 connection.addDispatcher( &consumer, &msgListener );
 
                 connection.stop();
                 consumerListener->onConsumerMessage( &consumer, cmd );
                 connection.start();
-                CPPUNIT_ASSERT( msgListener.messages.size() == 0 );
+                CPPUNIT_ASSERT_EQUAL( 1, (int)msgListener.messages.size() );
 
                 cmd = new connector::stomp::commands::TextMessageCommand;
 
@@ -237,7 +237,7 @@
                 cmd->setCMSDestination( &topic2 );
 
                 consumerListener->onConsumerMessage( &consumer, cmd );
-                CPPUNIT_ASSERT( msgListener.messages.size() == 1 );
+                CPPUNIT_ASSERT_EQUAL( 2, (int)msgListener.messages.size() );
 
                 connection.removeDispatcher( &consumer );
                 msgListener.messages.clear();
@@ -257,12 +257,9 @@
                 delete session2;
                 delete session3;
 
-            }
-            catch(...)
-            {
-                bool exceptionThrown = false;
-
-                CPPUNIT_ASSERT( exceptionThrown );
+            } catch( exceptions::ActiveMQException& ex ) {
+                ex.printStackTrace();
+                throw ex;
             }
         }
 



Mime
View raw message