qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r680752 - in /incubator/qpid/trunk/qpid/java: ./ client/src/main/java/org/apache/qpid/client/ systests/src/main/java/org/apache/qpid/test/unit/topic/ systests/src/main/java/org/apache/qpid/test/utils/
Date Tue, 29 Jul 2008 16:20:09 GMT
Author: aidan
Date: Tue Jul 29 09:20:06 2008
New Revision: 680752

URL: http://svn.apache.org/viewvc?rev=680752&view=rev
Log:
QPID-1203: Add 08ExcludeList for external Java broker and make the profile use that.

Make AMQConnectionFactory take an optional clientid and use that if specified.

Added:
    incubator/qpid/trunk/qpid/java/08ExcludeList-nonvm
Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
    incubator/qpid/trunk/qpid/java/java.testprofile
    incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java
    incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java

Added: incubator/qpid/trunk/qpid/java/08ExcludeList-nonvm
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/08ExcludeList-nonvm?rev=680752&view=auto
==============================================================================
--- incubator/qpid/trunk/qpid/java/08ExcludeList-nonvm (added)
+++ incubator/qpid/trunk/qpid/java/08ExcludeList-nonvm Tue Jul 29 09:20:06 2008
@@ -0,0 +1,24 @@
+org.apache.qpid.test.unit.xa.QueueTest#*
+org.apache.qpid.test.unit.xa.TopicTest#*
+org.apache.qpid.test.unit.xa.FaultTest#*
+org.apache.qpid.test.unit.ct.DurableSubscriberTests#*
+// Those tests are not finished
+org.apache.qpid.test.testcases.TTLTest#*
+org.apache.qpid.test.testcases.FailoverTest#*
+// This is a long running test so should exclude from normal runs
+org.apache.qpid.test.client.failover.FailoverTest#test4MinuteFailover
+// Those tests require failover support
+org.apache.qpid.test.client.QueueBrowserAutoAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserAutoAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserClientAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserClientAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserDupsOkTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserDupsOkTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserNoAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserNoAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserPreAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserPreAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserTransactedTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserTransactedTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.testcases.FailoverTest#*
+org.apache.qpid.test.client.failover.FailoverTest#*

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java?rev=680752&r1=680751&r2=680752&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
Tue Jul 29 09:20:06 2008
@@ -293,14 +293,23 @@
 
     public Connection createConnection(String userName, String password) throws JMSException
     {
+        return createConnection(userName, password, null);
+    }
+    
+    public Connection createConnection(String userName, String password, String id) throws
JMSException
+    {
         try
         {
             if (_connectionDetails != null)
             {
                 _connectionDetails.setUsername(userName);
                 _connectionDetails.setPassword(password);
-
-                if (_connectionDetails.getClientName() == null || _connectionDetails.getClientName().equals(""))
+                
+                if (id != null && !id.equals(""))
+                {
+                    _connectionDetails.setClientName(id);
+                } 
+                else if (_connectionDetails.getClientName() == null || _connectionDetails.getClientName().equals(""))
                 {
                     _connectionDetails.setClientName(getUniqueClientID());
                 }
@@ -308,7 +317,7 @@
             }
             else
             {
-                return new AMQConnection(_host, _port, userName, password, getUniqueClientID(),
_virtualPath);
+                return new AMQConnection(_host, _port, userName, password, (id != null ?
id : getUniqueClientID()), _virtualPath);
             }
         }
         catch (Exception e)

Modified: incubator/qpid/trunk/qpid/java/java.testprofile
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/java.testprofile?rev=680752&r1=680751&r2=680752&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/java.testprofile (original)
+++ incubator/qpid/trunk/qpid/java/java.testprofile Tue Jul 29 09:20:06 2008
@@ -1,3 +1,5 @@
 broker=build/bin/qpid-server
 broker.clean=${project.root}/clean-dir ${build.data}
 broker.ready=Qpid Broker Ready
+
+test.excludesfile=${project.root}/08ExcludeList-nonvm

Modified: incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java?rev=680752&r1=680751&r2=680752&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java
(original)
+++ incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/topic/TopicSessionTest.java
Tue Jul 29 09:20:06 2008
@@ -138,13 +138,13 @@
 
     public void testUnsubscriptionAfterConnectionClose() throws Exception
     {
-        AMQConnection con1 = (AMQConnection) getConnection("guest", "guest");
+        AMQConnection con1 = (AMQConnection) getConnection("guest", "guest", "clientid");
         AMQTopic topic = new AMQTopic(con1, "MyTopic3");
 
         TopicSession session1 = con1.createTopicSession(false, AMQSession.AUTO_ACKNOWLEDGE);
         TopicPublisher publisher = session1.createPublisher(topic);
 
-        AMQConnection con2 = (AMQConnection) getConnection("guest", "guest");
+        AMQConnection con2 = (AMQConnection) getConnection("guest", "guest", "clientid");
         TopicSession session2 = con2.createTopicSession(false, AMQSession.AUTO_ACKNOWLEDGE);
         TopicSubscriber sub = session2.createDurableSubscriber(topic, "subscription0");
 
@@ -155,7 +155,7 @@
         assertNotNull(tm);
         con2.close();
         publisher.publish(session1.createTextMessage("Hello2"));
-        con2 =  (AMQConnection) getConnection("guest", "guest");
+        con2 =  (AMQConnection) getConnection("guest", "guest", "clientid");
         session2 = con2.createTopicSession(false, AMQSession.NO_ACKNOWLEDGE);
         sub = session2.createDurableSubscriber(topic, "subscription0");
         con2.start();

Modified: incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java?rev=680752&r1=680751&r2=680752&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
(original)
+++ incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
Tue Jul 29 09:20:06 2008
@@ -481,7 +481,7 @@
         }
         else
         {
-            con = getConnectionFactory().createConnection(username, password);
+            con = getConnectionFactory().createConnection(username, password, id);
         }
         //add the connection in the lis of connections
         _connections.add(con);



Mime
View raw message