activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r718271 - in /activemq/activemq-cpp/trunk/src/test-integration/integration/connector: openwire/OpenwireAsyncSenderTest.cpp openwire/OpenwireAsyncSenderTest.h stomp/AsyncSenderTest.h
Date Mon, 17 Nov 2008 16:23:01 GMT
Author: tabish
Date: Mon Nov 17 08:23:00 2008
New Revision: 718271

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

Update the integration tests to reflect new async mode.

Complete the initial implementation of async send from the connector, deprecating the AsyncTransport.
 Initial Memory usage tracking is in place but will probably need more work as users start
using it.

Modified:
    activemq/activemq-cpp/trunk/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.cpp
    activemq/activemq-cpp/trunk/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.h
    activemq/activemq-cpp/trunk/src/test-integration/integration/connector/stomp/AsyncSenderTest.h

Modified: activemq/activemq-cpp/trunk/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.cpp?rev=718271&r1=718270&r2=718271&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.cpp
Mon Nov 17 08:23:00 2008
@@ -20,7 +20,7 @@
 #include <integration/IntegrationCommon.h>
 
 #include <decaf/lang/Thread.h>
-#include <activemq/connector/stomp/StompConnector.h>
+#include <activemq/connector/openwire/OpenWireConnector.h>
 #include <decaf/util/Properties.h>
 #include <activemq/transport/TransportFactory.h>
 #include <decaf/util/UUID.h>
@@ -55,7 +55,7 @@
 #include <cms/TextMessage.h>
 #include <cms/MapMessage.h>
 
-using namespace activemq::connector::stomp;
+using namespace activemq::connector::openwire;
 using namespace activemq::transport;
 using namespace activemq::util;
 using namespace std;
@@ -86,10 +86,21 @@
     try{
         std::string brokerURI =
             IntegrationCommon::getInstance().getOpenwireURL() +
-            "&transport.useAsyncSend=true";
+            "&connection.useAsyncSend=true";
         ActiveMQConnectionFactory* connectionFactory =
             new ActiveMQConnectionFactory(brokerURI);
-        cms::Connection* connection = connectionFactory->createConnection();
+        cms::Connection* connection = connectionFactory->createConnection();
+
+        ActiveMQConnection* amqConnection = dynamic_cast<ActiveMQConnection*>( connection
);
+        CPPUNIT_ASSERT( amqConnection != NULL );
+
+        OpenWireConnector* connector =
+            dynamic_cast<OpenWireConnector*>( amqConnection->getConnectionData()->getConnector()
);
+        CPPUNIT_ASSERT( amqConnection != NULL );
+
+        CPPUNIT_ASSERT( connector->isUseAsyncSend() );
+        CPPUNIT_ASSERT( !connector->isAlwaysSyncSend() );
+
         delete connectionFactory;
         connection->start();
         connection->stop();

Modified: activemq/activemq-cpp/trunk/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.h?rev=718271&r1=718270&r2=718271&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.h
(original)
+++ activemq/activemq-cpp/trunk/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.h
Mon Nov 17 08:23:00 2008
@@ -45,7 +45,7 @@
 
         virtual void setUp() {
             testSupport = new TestSupport;
-            testSupport->initialize(IntegrationCommon::getInstance().getOpenwireURL()
+ "&transport.useAsyncSend=true");
+            testSupport->initialize(IntegrationCommon::getInstance().getOpenwireURL()
+ "&connection.useAsyncSend=true");
         };
         virtual void tearDown() { delete testSupport; };
 

Modified: activemq/activemq-cpp/trunk/src/test-integration/integration/connector/stomp/AsyncSenderTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test-integration/integration/connector/stomp/AsyncSenderTest.h?rev=718271&r1=718270&r2=718271&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/test-integration/integration/connector/stomp/AsyncSenderTest.h
(original)
+++ activemq/activemq-cpp/trunk/src/test-integration/integration/connector/stomp/AsyncSenderTest.h
Mon Nov 17 08:23:00 2008
@@ -44,7 +44,8 @@
 
         virtual void setUp() {
             testSupport = new TestSupport;
-            testSupport->initialize( IntegrationCommon::getInstance().getStompURL() +
"&transport.useAsyncSend=true" );
+            testSupport->initialize( IntegrationCommon::getInstance().getStompURL() +
+                                     "&connection.useAsyncSend=true" );
         };
         virtual void tearDown() { delete testSupport; };
 



Mime
View raw message