[jboss-cvs] JBoss Messaging SVN: r2112 - trunk/tests/src/org/jboss/test/messaging/jms.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jan 30 17:03:39 EST 2007
Author: clebert.suconic at jboss.com
Date: 2007-01-30 17:03:39 -0500 (Tue, 30 Jan 2007)
New Revision: 2112
Modified:
trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-791 - this is also a bug according to integration testsuite
Modified: trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java 2007-01-30 21:46:59 UTC (rev 2111)
+++ trunk/tests/src/org/jboss/test/messaging/jms/DuplicateClientIDTest.java 2007-01-30 22:03:39 UTC (rev 2112)
@@ -86,6 +86,51 @@
}
+ public void testPreconfiguredDuplicateClientID() throws Exception
+ {
+ Connection c1 = null;
+ Connection c2 = null;
+ try
+ {
+
+ c1 = cf.createConnection("john", "needle");
+ c1.setClientID("Duplicated");
+
+ try
+ {
+ c2 = cf.createConnection("john", "needle");
+ c2.setClientID("Duplicated");
+ fail ("JBossMessaging is allowing duplicate clients!");
+ }
+ catch (InvalidClientIDException e)
+ {
+ }
+ }
+ finally
+ {
+ if (c1 != null) c1.close();
+ if (c2 != null) c2.close();
+ }
+ }
+
+ public void testNotDuplicateClientID() throws Exception
+ {
+ Connection c1 = null;
+ Connection c2 = null;
+ try
+ {
+
+ c1 = cf.createConnection();
+
+ c2 = cf.createConnection();
+ }
+ finally
+ {
+ if (c1 != null) c1.close();
+ if (c2 != null) c2.close();
+ }
+ }
+
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
More information about the jboss-cvs-commits
mailing list