activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1446973 - /activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/failover/FailoverTransportTest.cpp
Date Sat, 16 Feb 2013 23:00:17 GMT
Author: tabish
Date: Sat Feb 16 23:00:16 2013
New Revision: 1446973

URL: http://svn.apache.org/r1446973
Log:
make test less timing dependent

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

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/failover/FailoverTransportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/failover/FailoverTransportTest.cpp?rev=1446973&r1=1446972&r2=1446973&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/failover/FailoverTransportTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/transport/failover/FailoverTransportTest.cpp
Sat Feb 16 23:00:16 2013
@@ -559,12 +559,14 @@ void FailoverTransportTest::testTranspor
     FailoverTransport* failover = dynamic_cast<FailoverTransport*>(
         transport->narrow( typeid( FailoverTransport ) ) );
 
+    failover->setUpdateURIsSupported(true);
+
     CPPUNIT_ASSERT( failover != NULL );
     CPPUNIT_ASSERT( failover->isRandomize() == false );
 
     transport->start();
 
-    Thread::sleep( 1000 );
+    Thread::sleep( 3000 );
     CPPUNIT_ASSERT( failover->isConnected() == true );
 
     MockTransport* mock = NULL;
@@ -577,7 +579,7 @@ void FailoverTransportTest::testTranspor
     removals.add( URI("mock://localhost:61616") );
 
     mock->fireCommand( control );
-    Thread::sleep( 1000 );
+    Thread::sleep( 2000 );
     failover->removeURI( true, removals );
 
     Thread::sleep( 2000 );
@@ -588,5 +590,5 @@ void FailoverTransportTest::testTranspor
         mock = dynamic_cast<MockTransport*>( transport->narrow( typeid( MockTransport
) ) );
     }
 
-    CPPUNIT_ASSERT_EQUAL( mock->getName() ,std::string( "Reconnect" ) );
+    CPPUNIT_ASSERT_EQUAL(std::string("Reconnect"), mock->getName());
 }



Mime
View raw message