[jboss-cvs] JBoss Messaging SVN: r2989 - in trunk: tests and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Aug 9 06:41:51 EDT 2007
Author: timfox
Date: 2007-08-09 06:41:51 -0400 (Thu, 09 Aug 2007)
New Revision: 2989
Modified:
trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java
trunk/tests/build.xml
trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java
Log:
Tests speedup
Modified: trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java 2007-08-08 22:56:33 UTC (rev 2988)
+++ trunk/src/main/org/jboss/jms/client/container/ClusteringAspect.java 2007-08-09 10:41:51 UTC (rev 2989)
@@ -7,6 +7,7 @@
package org.jboss.jms.client.container;
import java.util.Arrays;
+import java.util.Iterator;
import java.util.Map;
import javax.jms.JMSException;
@@ -264,6 +265,8 @@
"It is likely you haven't deployed the connection factory on all nodes in the cluster.");
}
+ if (trace) { dumpFailoverMap(failoverMap); }
+
Integer failoverNodeID = (Integer)failoverMap.get(nodeID);
log.trace("Found failover node id = " + failoverNodeID);
@@ -288,6 +291,17 @@
return null;
}
+
+ private void dumpFailoverMap(Map failoverMap)
+ {
+ log.trace("Dumping failover map");
+ Iterator iter = failoverMap.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ Map.Entry entry = (Map.Entry)iter.next();
+ log.trace(entry.getKey() + "-->" + entry.getValue());
+ }
+ }
/**
* FailoverNodeID is not on the map, that means the ConnectionFactory was updated by another
Modified: trunk/tests/build.xml
===================================================================
--- trunk/tests/build.xml 2007-08-08 22:56:33 UTC (rev 2988)
+++ trunk/tests/build.xml 2007-08-09 10:41:51 UTC (rev 2989)
@@ -750,8 +750,9 @@
<formatter classname="org.jboss.test.messaging.tools.ant.JUnitTestSuiteListener"/>
<fileset dir="${build.tests.classes}">
-
+<!--
<include name="**/jms/clustering/${test-mask}.class"/>
+-->
<exclude name="**/jms/clustering/ClusterLeakTest.class"/>
<exclude name="**/jms/clustering/NoFailoverTest.class"/>
@@ -775,8 +776,10 @@
<include name="**/jms/clustering/DistributedRequestResponseTest.class"/>
<include name="**/jms/clustering/LoadBalancingTest.class"/>
<include name="**/jms/clustering/TemporaryDestinationTest.class"/>
+-->
<include name="**/jms/clustering/DistributedTopicTest.class"/>
<include name="**/jms/clustering/FailoverTest.class"/>
+<!--
<include name="**/jms/clustering/GroupManagementTest.class"/>
<include name="**/jms/clustering/LargeClusterTest.class"/>
-->
Modified: trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java 2007-08-08 22:56:33 UTC (rev 2988)
+++ trunk/tests/src/org/jboss/test/messaging/jms/clustering/FailoverTest.java 2007-08-09 10:41:51 UTC (rev 2989)
@@ -11,6 +11,7 @@
import java.util.Set;
import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
import javax.jms.DeliveryMode;
import javax.jms.Message;
import javax.jms.MessageConsumer;
@@ -51,11 +52,17 @@
public void testSimpleConnectionFailover() throws Exception
{
+ //We need to sleep and relookup the connection factory due to http://jira.jboss.com/jira/browse/JBMESSAGING-1038
+ //remove this when this task is complete
+ Thread.sleep(2000);
+
+ ConnectionFactory theCF = (ConnectionFactory)ic[0].lookup("/ClusteredConnectionFactory");
+
Connection conn = null;
try
{
- conn = createConnectionOnServer(cf, 1);
+ conn = createConnectionOnServer(theCF, 1);
conn.start();
// register a failover listener
More information about the jboss-cvs-commits
mailing list