activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r754893 - /activemq/activemq-cpp/trunk/src/test/activemq/transport/failover/FailoverTransportTest.cpp
Date Mon, 16 Mar 2009 13:53:41 GMT
Author: tabish
Date: Mon Mar 16 13:53:40 2009
New Revision: 754893

URL: http://svn.apache.org/viewvc?rev=754893&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-100

Increase the amount of messages sent in the Oneway Send test to 1000 to stress the transport
a little more.

Modified:
    activemq/activemq-cpp/trunk/src/test/activemq/transport/failover/FailoverTransportTest.cpp

Modified: activemq/activemq-cpp/trunk/src/test/activemq/transport/failover/FailoverTransportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/failover/FailoverTransportTest.cpp?rev=754893&r1=754892&r2=754893&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/failover/FailoverTransportTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/failover/FailoverTransportTest.cpp
Mon Mar 16 13:53:40 2009
@@ -209,6 +209,7 @@
 
     std::string uri = "failover://(mock://localhost:61616)?randomize=false";
 
+    const int numMessages = 1000;
     Pointer<ActiveMQMessage> message( new ActiveMQMessage() );
 
     MessageCountingListener messageCounter;
@@ -233,13 +234,13 @@
     }
     mock->setOutgoingListener( &messageCounter );
 
-    transport->oneway( message );
-    transport->oneway( message );
-    transport->oneway( message );
-    transport->oneway( message );
-    Thread::sleep( 1000 );
+    for( int i = 0; i < numMessages; ++i ) {
+        transport->oneway( message );
+    }
 
-    CPPUNIT_ASSERT( messageCounter.numMessages = 4 );
+    Thread::sleep( 2000 );
+
+    CPPUNIT_ASSERT( messageCounter.numMessages = numMessages );
 
     transport->close();
 }



Mime
View raw message