activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r532771 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/connector/openwire: OpenwireAsyncSenderTest.cpp OpenwireAsyncSenderTest.h
Date Thu, 26 Apr 2007 15:06:04 GMT
Author: tabish
Date: Thu Apr 26 08:06:03 2007
New Revision: 532771

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

Adding in a new test

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

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.cpp?view=diff&rev=532771&r1=532770&r2=532771
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.cpp
Thu Apr 26 08:06:03 2007
@@ -31,6 +31,7 @@
 #include <activemq/transport/TransportFactory.h>
 #include <activemq/network/Socket.h>
 #include <activemq/exceptions/NullPointerException.h>
+#include <activemq/core/ActiveMQConnectionFactory.h>
 #include <activemq/core/ActiveMQConnection.h>
 #include <activemq/core/ActiveMQConsumer.h>
 #include <activemq/core/ActiveMQProducer.h>
@@ -85,7 +86,28 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void OpenwireAsyncSenderTest::test()
+void OpenwireAsyncSenderTest::test1()
+{
+    try{
+        std::string brokerURI =
+            "tcp://127.0.0.1:61616"
+            "?wireFormat=openwire"
+            "&transport.useAsyncSend=true";
+        ActiveMQConnectionFactory* connectionFactory = 
+            new ActiveMQConnectionFactory(brokerURI);
+        cms::Connection* connection = connectionFactory->createConnection();
+        delete connectionFactory;
+        connection->start();
+        connection->stop();
+        delete connection;
+        CPPUNIT_ASSERT( true );
+    } catch(...) {
+        CPPUNIT_ASSERT( false );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireAsyncSenderTest::test2()
 {
     try
     {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.h?view=diff&rev=532771&r1=532770&r2=532771
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/connector/openwire/OpenwireAsyncSenderTest.h
Thu Apr 26 08:06:03 2007
@@ -30,7 +30,8 @@
     class OpenwireAsyncSenderTest : public CppUnit::TestFixture {
         
         CPPUNIT_TEST_SUITE( OpenwireAsyncSenderTest );
-        CPPUNIT_TEST( test );
+        CPPUNIT_TEST( test1 );
+        CPPUNIT_TEST( test2 );
         CPPUNIT_TEST_SUITE_END();
 
     private:
@@ -42,7 +43,8 @@
         OpenwireAsyncSenderTest();
         virtual ~OpenwireAsyncSenderTest();
 
-        virtual void test();
+        virtual void test1();
+        virtual void test2();
 
     };
 



Mime
View raw message