You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2011/09/13 02:28:10 UTC

svn commit: r1169984 - in /qpid/trunk/qpid/java: systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java test-profiles/JavaPre010Excludes

Author: robbie
Date: Tue Sep 13 00:28:09 2011
New Revision: 1169984

URL: http://svn.apache.org/viewvc?rev=1169984&view=rev
Log:
QPID-3428: fix excludes after test related changes from to prior patch feeback, add a bit of javadoc to tests and use constants

Modified:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
    qpid/trunk/qpid/java/test-profiles/JavaPre010Excludes

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java?rev=1169984&r1=1169983&r2=1169984&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java Tue Sep 13 00:28:09 2011
@@ -32,6 +32,7 @@ import org.apache.qpid.client.AMQConnect
 import org.apache.qpid.client.AMQQueue;
 import org.apache.qpid.client.AMQSession;
 import org.apache.qpid.client.AMQTopic;
+import org.apache.qpid.configuration.ClientProperties;
 import org.apache.qpid.exchange.ExchangeDefaults;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.jms.BrokerDetails;
@@ -292,9 +293,14 @@ public class ConnectionTest extends Qpid
         }
     }
 
+    /**
+     * Tests that when the same user connects twice with same clientid, the second connection
+     * fails if the clientid verification feature is enabled (which uses a dummy 0-10 Session
+     * with the clientid as its name to detect the previous usage of the clientid by the user)
+     */
     public void testClientIDVerificationForSameUser() throws Exception
     {
-        setTestSystemProperty("qpid.verify_client_id", "true");
+        setTestSystemProperty(ClientProperties.QPID_VERIFY_CLIENT_ID, "true");
 
         BrokerDetails broker = getBroker();
         try
@@ -315,9 +321,15 @@ public class ConnectionTest extends Qpid
         }
     }
 
+    /**
+     * Tests that when different users connects with same clientid, the second connection
+     * succeeds even though the clientid verification feature is enabled (which uses a dummy
+     * 0-10 Session with the clientid as its name; these are only verified unique on a
+     * per-principal basis)
+     */
     public void testClientIDVerificationForDifferentUsers() throws Exception
     {
-        setTestSystemProperty("qpid.verify_client_id", "true");
+        setTestSystemProperty(ClientProperties.QPID_VERIFY_CLIENT_ID, "true");
 
         BrokerDetails broker = getBroker();
         try

Modified: qpid/trunk/qpid/java/test-profiles/JavaPre010Excludes
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/test-profiles/JavaPre010Excludes?rev=1169984&r1=1169983&r2=1169984&view=diff
==============================================================================
--- qpid/trunk/qpid/java/test-profiles/JavaPre010Excludes (original)
+++ qpid/trunk/qpid/java/test-profiles/JavaPre010Excludes Tue Sep 13 00:28:09 2011
@@ -58,4 +58,5 @@ org.apache.qpid.test.unit.ack.FailoverBe
 org.apache.qpid.test.client.queue.LVQTest#*
 
 // Verification of unique client id is 0-10 specific
-org.apache.qpid.test.unit.client.connection.ConnectionTest#testClientIDVerification
+org.apache.qpid.test.unit.client.connection.ConnectionTest#testClientIDVerificationForSameUser
+org.apache.qpid.test.unit.client.connection.ConnectionTest#testClientIDVerificationForDifferentUsers



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org