summaryrefslogtreecommitdiff
path: root/java/systests
diff options
context:
space:
mode:
Diffstat (limited to 'java/systests')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java b/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
index 328719813a..1fa6829bf9 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
@@ -32,6 +32,7 @@ import org.apache.qpid.client.AMQConnectionURL;
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 QpidBrokerTestCase
}
}
+ /**
+ * 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 QpidBrokerTestCase
}
}
+ /**
+ * 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