[hornetq-commits] JBoss hornetq SVN: r8430 - in trunk: docs/user-manual/en and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Nov 27 12:23:39 EST 2009


Author: jmesnil
Date: 2009-11-27 12:23:39 -0500 (Fri, 27 Nov 2009)
New Revision: 8430

Added:
   trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyFileStorageStaticClusterWithBackupFailoverTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyStaticClusterWithBackupFailoverTest.java
   trunk/tests/src/org/hornetq/tests/integration/cluster/failover/StaticClusterWithBackupFailoverTest.java
Modified:
   trunk/build-hornetq.xml
   trunk/docs/user-manual/en/clusters.xml
Log:
https://jira.jboss.org/jira/browse/HORNETQ-65: Statically wired clusters and initial/reconnection

* added failover test for static cluster but excludes them from integration-tests Ant target
  until HORNETQ-65 is fixed
* added note about failover not working with static server in clusters.xml#cluster.static.servers

Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml	2009-11-27 13:41:41 UTC (rev 8429)
+++ trunk/build-hornetq.xml	2009-11-27 17:23:39 UTC (rev 8430)
@@ -1222,6 +1222,8 @@
                <!-- <exclude name="**/integration/http/*" /> -->
             	<!-- cluster tests with backup are brittled and are temporarily excluded -->
                <exclude name="**/cluster/distribution/*WithBackupTest.class" />
+               <!-- exlcuded because of https://jira.jboss.org/jira/browse/HORNETQ-65 -->
+               <exclude name="**/cluster/failover/*StaticClusterWithBackupFailoverTest.class" />
                <include name="${tests.param}"/>
             </fileset>
          </batchtest>

Modified: trunk/docs/user-manual/en/clusters.xml
===================================================================
--- trunk/docs/user-manual/en/clusters.xml	2009-11-27 13:41:41 UTC (rev 8429)
+++ trunk/docs/user-manual/en/clusters.xml	2009-11-27 17:23:39 UTC (rev 8430)
@@ -611,6 +611,11 @@
                     <literal>backup-connector-name</literal> is optional, and if specified it also
                 references a connector defined in <literal>hornetq-configuration.xml</literal>. For more
                 information on connectors please see <xref linkend="configuring-transports" />.</para>
+            <note>
+               <para>Due to a limitation in HornetQ 2.0.0, failover is not supported for clusters
+                  defined using a static set of nodes. To support failover over cluster nodes, they 
+                  must be configured to use a discovery group.</para>
+            </note>
         </section>
     </section>
     <section id="clusters.message-redistribution">

Added: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java	                        (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FileStorageStaticClusterWithBackupFailoverTest.java	2009-11-27 17:23:39 UTC (rev 8430)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+package org.hornetq.tests.integration.cluster.failover;
+
+/**
+ * A FileStorageClusterWithBackupFailoverTest
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class FileStorageStaticClusterWithBackupFailoverTest extends StaticClusterWithBackupFailoverTest
+{
+   protected boolean isFileStorage()
+   {
+      return true;
+   }
+}

Added: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyFileStorageStaticClusterWithBackupFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyFileStorageStaticClusterWithBackupFailoverTest.java	                        (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyFileStorageStaticClusterWithBackupFailoverTest.java	2009-11-27 17:23:39 UTC (rev 8430)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+package org.hornetq.tests.integration.cluster.failover;
+
+/**
+ * A NettyFileStorageClusterWithBackupFailoverTest
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class NettyFileStorageStaticClusterWithBackupFailoverTest extends StaticClusterWithBackupFailoverTest 
+{
+   protected boolean isNetty()
+   {
+      return true;
+   }
+
+   protected boolean isFileStorage()
+   {
+      return true;
+   }
+}

Added: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyStaticClusterWithBackupFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyStaticClusterWithBackupFailoverTest.java	                        (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyStaticClusterWithBackupFailoverTest.java	2009-11-27 17:23:39 UTC (rev 8430)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+package org.hornetq.tests.integration.cluster.failover;
+
+/**
+ * A NettyClusterWithBackupFailoverTest
+ *
+ * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class NettyStaticClusterWithBackupFailoverTest extends StaticClusterWithBackupFailoverTest
+{
+   protected boolean isNetty()
+   {
+      return true;
+   }   
+}
+
+

Added: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/StaticClusterWithBackupFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/StaticClusterWithBackupFailoverTest.java	                        (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/StaticClusterWithBackupFailoverTest.java	2009-11-27 17:23:39 UTC (rev 8430)
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.  See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.tests.integration.cluster.failover;
+
+/**
+ * A StaticClusterWithBackupFailoverTest
+ *
+ * @author jmesnil
+ *
+ *
+ */
+public class StaticClusterWithBackupFailoverTest extends ClusterWithBackupFailoverTestBase
+{
+
+   // Constants -----------------------------------------------------
+
+   // Attributes ----------------------------------------------------
+
+   // Static --------------------------------------------------------
+
+   // Constructors --------------------------------------------------
+
+   // Public --------------------------------------------------------
+   protected void setupCluster(final boolean forwardWhenNoConsumers) throws Exception
+   {
+      setupClusterConnectionWithBackups("cluster0",
+                                        "queues",
+                                        forwardWhenNoConsumers,
+                                        1,
+                                        isNetty(),
+                                        0,
+                                        new int[] { 1, 2 },
+                                        new int[] { 4, 5 });
+
+      setupClusterConnectionWithBackups("cluster1",
+                                        "queues",
+                                        forwardWhenNoConsumers,
+                                        1,
+                                        isNetty(),
+                                        1,
+                                        new int[] { 0, 2 },
+                                        new int[] { 3, 5 });
+
+      setupClusterConnectionWithBackups("cluster2",
+                                        "queues",
+                                        forwardWhenNoConsumers,
+                                        1,
+                                        isNetty(),
+                                        2,
+                                        new int[] { 0, 1 },
+                                        new int[] { 3, 4 });
+
+      setupClusterConnectionWithBackups("cluster0",
+                                        "queues",
+                                        forwardWhenNoConsumers,
+                                        1,
+                                        isNetty(),
+                                        3,
+                                        new int[] { 1, 2 },
+                                        new int[] { 4, 5 });
+
+      setupClusterConnectionWithBackups("cluster1",
+                                        "queues",
+                                        forwardWhenNoConsumers,
+                                        1,
+                                        isNetty(),
+                                        4,
+                                        new int[] { 0, 2 },
+                                        new int[] { 3, 5 });
+
+      setupClusterConnectionWithBackups("cluster2",
+                                        "queues",
+                                        forwardWhenNoConsumers,
+                                        1,
+                                        isNetty(),
+                                        5,
+                                        new int[] { 0, 1 },
+                                        new int[] { 3, 4 });
+   }
+
+   protected void setupServers() throws Exception
+   {
+      // The backups
+      setupServer(3, isFileStorage(), isNetty(), true);
+      setupServer(4, isFileStorage(), isNetty(), true);
+      setupServer(5, isFileStorage(), isNetty(), true);
+
+      // The lives
+      setupServer(0, isFileStorage(), isNetty(), 3);
+      setupServer(1, isFileStorage(), isNetty(), 4);
+      setupServer(2, isFileStorage(), isNetty(), 5);
+   }
+   // Package protected ---------------------------------------------
+
+   // Protected -----------------------------------------------------
+
+   // Private -------------------------------------------------------
+
+   // Inner classes -------------------------------------------------
+
+}



More information about the hornetq-commits mailing list