activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r358594 - in /incubator/activemq/trunk/activecluster: .classpath src/java/org/activecluster/impl/DefaultClusterFactory.java src/java/org/activecluster/impl/StateServiceImpl.java src/test/org/activecluster/ClusterTest.java
Date Thu, 22 Dec 2005 17:36:23 GMT
Author: rajdavies
Date: Thu Dec 22 09:36:17 2005
New Revision: 358594

URL: http://svn.apache.org/viewcvs?rev=358594&view=rev
Log:
Fixed failing test in ClusterTest

Modified:
    incubator/activemq/trunk/activecluster/.classpath
    incubator/activemq/trunk/activecluster/src/java/org/activecluster/impl/DefaultClusterFactory.java
    incubator/activemq/trunk/activecluster/src/java/org/activecluster/impl/StateServiceImpl.java
    incubator/activemq/trunk/activecluster/src/test/org/activecluster/ClusterTest.java

Modified: incubator/activemq/trunk/activecluster/.classpath
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activecluster/.classpath?rev=358594&r1=358593&r2=358594&view=diff
==============================================================================
--- incubator/activemq/trunk/activecluster/.classpath (original)
+++ incubator/activemq/trunk/activecluster/.classpath Thu Dec 22 09:36:17 2005
@@ -1,32 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <classpath>
-  <classpathentry excluding="" kind="src" path="src/java">
-  </classpathentry>
-  <classpathentry output="workspace/eclipse/activemq/bin" kind="src" path="src/test">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar">
-  </classpathentry>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-jms-1.1-rc4.jar">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-jta-1.0.1B-rc4.jar">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-j2ee-management-1.0-rc4.jar">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/activemq/jars/activemq-core-4.0-SNAPSHOT.jar">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/activeio/jars/activeio-2.1-SNAPSHOT.jar">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-j2ee-jacc-1.0-rc4.jar">
-  </classpathentry>
-  <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar">
-  </classpathentry>
-  <classpathentry kind="output" path="workspace/eclipse/activemq/bin">
-  </classpathentry>
-</classpath>
\ No newline at end of file
+	<classpathentry kind="src" path="src/java"/>
+	<classpathentry output="target/test-classes" kind="src" path="src/test"/>
+	<classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.4.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-jms-1.1-rc4.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-jta-1.0.1B-rc4.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-j2ee-management-1.0-rc4.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/backport-util-concurrent/jars/backport-util-concurrent-2.0_01_pd.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/geronimo-spec/jars/geronimo-spec-j2ee-jacc-1.0-rc4.jar"/>
+	<classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/activeio"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/activemq-core"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Modified: incubator/activemq/trunk/activecluster/src/java/org/activecluster/impl/DefaultClusterFactory.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activecluster/src/java/org/activecluster/impl/DefaultClusterFactory.java?rev=358594&r1=358593&r2=358594&view=diff
==============================================================================
--- incubator/activemq/trunk/activecluster/src/java/org/activecluster/impl/DefaultClusterFactory.java
(original)
+++ incubator/activemq/trunk/activecluster/src/java/org/activecluster/impl/DefaultClusterFactory.java
Thu Dec 22 09:36:17 2005
@@ -164,7 +164,7 @@
     //-------------------------------------------------------------------------
     protected Cluster createCluster(Connection connection,Session session,String name,Destination
groupDestination,
                     DestinationMarshaller marshaller) throws JMSException{
-        String dataDestination=dataTopicPrefix+groupDestination;
+        String dataDestination = dataTopicPrefix + marshaller.getDestinationName(groupDestination);
         log.info("Creating cluster group producer on topic: "+groupDestination);
         MessageProducer producer=createProducer(session,null);
         producer.setDeliveryMode(deliveryMode);

Modified: incubator/activemq/trunk/activecluster/src/java/org/activecluster/impl/StateServiceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activecluster/src/java/org/activecluster/impl/StateServiceImpl.java?rev=358594&r1=358593&r2=358594&view=diff
==============================================================================
--- incubator/activemq/trunk/activecluster/src/java/org/activecluster/impl/StateServiceImpl.java
(original)
+++ incubator/activemq/trunk/activecluster/src/java/org/activecluster/impl/StateServiceImpl.java
Thu Dec 22 09:36:17 2005
@@ -123,7 +123,7 @@
         HashMap answer = new HashMap(nodes.size());
         for (Iterator iter = nodes.entrySet().iterator(); iter.hasNext();) {
             Map.Entry entry = (Map.Entry) iter.next();
-            String key = entry.getKey().toString();
+            Object key = entry.getKey();
             NodeEntry nodeEntry = (NodeEntry) entry.getValue();
             answer.put(key, nodeEntry.node);
         }

Modified: incubator/activemq/trunk/activecluster/src/test/org/activecluster/ClusterTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activecluster/src/test/org/activecluster/ClusterTest.java?rev=358594&r1=358593&r2=358594&view=diff
==============================================================================
--- incubator/activemq/trunk/activecluster/src/test/org/activecluster/ClusterTest.java (original)
+++ incubator/activemq/trunk/activecluster/src/test/org/activecluster/ClusterTest.java Thu
Dec 22 09:36:17 2005
@@ -27,7 +27,7 @@
  */
 public class ClusterTest extends ClusterTestSupport {
 
-    protected int count = 2;
+    protected int count = 3;
 
     public void testCluster() throws Exception {
         cluster = createCluster();
@@ -76,9 +76,7 @@
 
         assertClusterMembership(clusters);
 
-        // lets wait for a while to see if things fail
-        Thread.sleep(10000L);
-
+      
         assertClusterMembership(clusters);
 
         Cluster testCluster = clusters[0];
@@ -89,10 +87,12 @@
         Map map = testNode.getState();
         map.put(key, value);
         testNode.setState(map);
+        
 
-        Thread.sleep(5000);
+        Thread.sleep(500);
         for (int i = 1; i < count; i++) {
             Node node = (Node) clusters[i].getNodes().get(testNode.getDestination());
+          
             assertTrue("The current test node should be in the cluster: " + i, node != null);
             assertTrue(node.getState().get(key).equals(value));
         }



Mime
View raw message