activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r750168 - in /activemq/activemq-cpp/trunk/src/test/activemq/transport: IOTransportTest.cpp failover/FailoverTransportTest.cpp
Date Wed, 04 Mar 2009 21:40:33 GMT
Author: tabish
Date: Wed Mar  4 21:40:33 2009
New Revision: 750168

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

Put the tests into the right state for testing Failover.

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

Modified: activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp?rev=750168&r1=750167&r2=750168&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp (original)
+++ activemq/activemq-cpp/trunk/src/test/activemq/transport/IOTransportTest.cpp Wed Mar  4
21:40:33 2009
@@ -225,9 +225,10 @@
     decaf::io::DataInputStream input( &bis );
     decaf::io::DataOutputStream output( &bos );
 
+    Pointer<MyWireFormat> wireFormat( new MyWireFormat() );
+    MyTransportListener listener;
+
     for( int i = 0; i < 50; ++i ) {
-        Pointer<MyWireFormat> wireFormat( new MyWireFormat() );
-        MyTransportListener listener;
 
         IOTransport transport;
         transport.setWireFormat( wireFormat );

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=750168&r1=750167&r2=750168&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
Wed Mar  4 21:40:33 2009
@@ -41,11 +41,12 @@
 
     std::string uri = "failover://(mock://localhost:61616)?randomize=false";
 
+    DefaultTransportListener listener;
     FailoverTransportFactory factory;
 
     Pointer<Transport> transport( factory.create( uri ) );
-
     CPPUNIT_ASSERT( transport != NULL );
+    transport->setTransportListener( &listener );
 
     FailoverTransport* failover = dynamic_cast<FailoverTransport*>(
         transport->narrow( typeid( FailoverTransport ) ) );
@@ -53,6 +54,7 @@
     CPPUNIT_ASSERT( failover != NULL );
     CPPUNIT_ASSERT( failover->isRandomize() == false );
 
+//    transport->start();
     transport->close();
 }
 



Mime
View raw message