JBoss hornetq SVN: r8432 - trunk/tests/src/org/hornetq/tests/integration/paging.
by do-not-reply@jboss.org
Author: timfox
Date: 2009-11-27 16:15:05 -0500 (Fri, 27 Nov 2009)
New Revision: 8432
Added:
trunk/tests/src/org/hornetq/tests/integration/paging/NettyPagingSendTest.java
trunk/tests/src/org/hornetq/tests/integration/paging/PagingSendTest.java
Log:
merge of 20-optimisation branch
Added: trunk/tests/src/org/hornetq/tests/integration/paging/NettyPagingSendTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/paging/NettyPagingSendTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/paging/NettyPagingSendTest.java 2009-11-27 21:15:05 UTC (rev 8432)
@@ -0,0 +1,29 @@
+/*
+ * 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.paging;
+
+/**
+ * A NettyPagingSendTest
+ *
+ * @author tim
+ *
+ *
+ */
+public class NettyPagingSendTest extends PagingSendTest
+{
+ protected boolean isNetty()
+ {
+ return true;
+ }
+}
Added: trunk/tests/src/org/hornetq/tests/integration/paging/PagingSendTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/paging/PagingSendTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/paging/PagingSendTest.java 2009-11-27 21:15:05 UTC (rev 8432)
@@ -0,0 +1,170 @@
+/*
+ * 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.paging;
+
+import org.hornetq.core.client.ClientConsumer;
+import org.hornetq.core.client.ClientMessage;
+import org.hornetq.core.client.ClientProducer;
+import org.hornetq.core.client.ClientSession;
+import org.hornetq.core.client.ClientSessionFactory;
+import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.settings.impl.AddressSettings;
+import org.hornetq.tests.util.ServiceTestBase;
+import org.hornetq.utils.SimpleString;
+
+/**
+ * A SendTest
+ *
+ * @author <mailto:clebert.suconic@jboss.org">Clebert Suconic</a>
+ *
+ *
+ */
+public class PagingSendTest extends ServiceTestBase
+{
+
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ public static final SimpleString ADDRESS = new SimpleString("SimpleAddress");
+
+ // Static --------------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ // Public --------------------------------------------------------
+
+ protected boolean isNetty()
+ {
+ return false;
+ }
+
+ private HornetQServer newHornetQServer()
+ {
+ HornetQServer server = super.createServer(true, isNetty());
+
+ AddressSettings defaultSetting = new AddressSettings();
+ defaultSetting.setPageSizeBytes(10 * 1024);
+ defaultSetting.setMaxSizeBytes(100 * 1024);
+
+ server.getAddressSettingsRepository().addMatch("#", defaultSetting);
+
+ return server;
+ }
+
+ public void testSameMessageOverAndOverBlocking() throws Exception
+ {
+ dotestSameMessageOverAndOver(true);
+ }
+
+ public void testSameMessageOverAndOverNonBlocking() throws Exception
+ {
+ dotestSameMessageOverAndOver(false);
+ }
+
+ public void dotestSameMessageOverAndOver(final boolean blocking) throws Exception
+ {
+ HornetQServer server = newHornetQServer();
+
+ server.start();
+
+ try
+ {
+ ClientSessionFactory sf;
+
+ if (isNetty())
+ {
+ sf = createNettyFactory();
+ }
+ else
+ {
+ sf = createInVMFactory();
+ }
+
+ // Making it synchronous, just because we want to stop sending messages as soon as the page-store becomes in
+ // page mode
+ // and we could only guarantee that by setting it to synchronous
+ sf.setBlockOnNonPersistentSend(blocking);
+ sf.setBlockOnPersistentSend(blocking);
+ sf.setBlockOnAcknowledge(blocking);
+
+ ClientSession session = sf.createSession(null, null, false, true, true, false, 0);
+
+ session.createQueue(ADDRESS, ADDRESS, null, true);
+
+ ClientProducer producer = session.createProducer(ADDRESS);
+
+ ClientMessage message = null;
+
+ message = session.createClientMessage(true);
+ message.getBodyBuffer().writeBytes(new byte[1024]);
+
+ for (int i = 0; i < 200; i++)
+ {
+ System.out.println("Sent " + i);
+ producer.send(message);
+ }
+
+ session.close();
+
+ assertTrue(server.getPostOffice().getPagingManager().getTotalMemory() > 0);
+
+ session = sf.createSession(null, null, false, true, true, false, 0);
+
+ ClientConsumer consumer = session.createConsumer(ADDRESS);
+
+ session.start();
+
+ for (int i = 0; i < 200; i++)
+ {
+ ClientMessage message2 = consumer.receive(10000);
+
+ assertNotNull(message2);
+
+ if (i == 100)
+ {
+ session.commit();
+ }
+
+ message2.acknowledge();
+ }
+
+ consumer.close();
+
+ session.close();
+
+ assertEquals(0, server.getPostOffice().getPagingManager().getTotalMemory());
+
+ }
+ finally
+ {
+ try
+ {
+ server.stop();
+ }
+ catch (Throwable ignored)
+ {
+ }
+ }
+ }
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+
+}
\ No newline at end of file
15 years
JBoss hornetq SVN: r8430 - in trunk: docs/user-manual/en and 1 other directories.
by do-not-reply@jboss.org
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@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@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@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 -------------------------------------------------
+
+}
15 years
JBoss hornetq SVN: r8429 - in trunk: tests/src/org/hornetq/tests/integration/cluster/failover and 1 other directory.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-11-27 08:41:41 -0500 (Fri, 27 Nov 2009)
New Revision: 8429
Added:
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/DiscoveryClusterWithBackupFailoverTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FileStorageDiscoveryClusterWithBackupFailoverTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyDiscoveryClusterWithBackupFailoverTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyFileStorageDiscoveryClusterWithBackupFailoverTest.java
Modified:
trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java
Log:
re-added failover tests for cluster with backup (w/ discovery groups)
Modified: trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java 2009-11-27 11:54:46 UTC (rev 8428)
+++ trunk/src/main/org/hornetq/core/client/impl/FailoverManagerImpl.java 2009-11-27 13:41:41 UTC (rev 8429)
@@ -19,6 +19,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
@@ -73,6 +74,69 @@
private static final Logger log = Logger.getLogger(FailoverManagerImpl.class);
+ // debug
+
+ private static Map<TransportConfiguration, Set<RemotingConnection>> debugConns;
+
+ private static boolean debug = false;
+
+ public static void enableDebug()
+ {
+ debug = true;
+
+ debugConns = new ConcurrentHashMap<TransportConfiguration, Set<RemotingConnection>>();
+ }
+
+ public static void disableDebug()
+ {
+ debug = false;
+
+ debugConns.clear();
+ debugConns = null;
+ }
+
+ private void checkAddDebug(final RemotingConnection conn)
+ {
+ Set<RemotingConnection> conns;
+
+ synchronized (debugConns)
+ {
+ conns = debugConns.get(connectorConfig);
+
+ if (conns == null)
+ {
+ conns = new HashSet<RemotingConnection>();
+
+ debugConns.put(connectorConfig, conns);
+ }
+
+ conns.add(conn);
+ }
+ }
+
+ public static void failAllConnectionsForConnector(final TransportConfiguration config)
+ {
+ Set<RemotingConnection> conns;
+
+ synchronized (debugConns)
+ {
+ conns = debugConns.get(config);
+
+ if (conns != null)
+ {
+ conns = new HashSet<RemotingConnection>(debugConns.get(config));
+ }
+ }
+
+ if (conns != null)
+ {
+ for (RemotingConnection conn : conns)
+ {
+ conn.fail(new HornetQException(HornetQException.INTERNAL_ERROR, "blah"));
+ }
+ }
+ }
+
// Attributes
// -----------------------------------------------------------------------------------
@@ -773,6 +837,12 @@
}
else
{
+
+ if (debug)
+ {
+ checkAddDebug(theConnection);
+ }
+
return theConnection;
}
}
Added: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java 2009-11-27 13:41:41 UTC (rev 8429)
@@ -0,0 +1,243 @@
+/*
+ * 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;
+
+import java.util.Map;
+
+import org.hornetq.core.client.impl.FailoverManagerImpl;
+import org.hornetq.core.config.TransportConfiguration;
+import org.hornetq.core.logging.Logger;
+import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.cluster.BroadcastGroup;
+import org.hornetq.tests.integration.cluster.distribution.ClusterTestBase;
+
+/**
+ *
+ * A ClusterWithBackupFailoverTest
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ * Created 9 Mar 2009 16:31:21
+ *
+ *
+ */
+public abstract class ClusterWithBackupFailoverTestBase extends ClusterTestBase
+{
+ private static final Logger log = Logger.getLogger(ClusterWithBackupFailoverTestBase.class);
+
+
+ protected abstract void setupCluster(final boolean forwardWhenNoConsumers) throws Exception;
+
+ protected abstract void setupServers() throws Exception;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ FailoverManagerImpl.enableDebug();
+
+ setupServers();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ stopServers();
+
+ FailoverManagerImpl.disableDebug();
+
+ super.tearDown();
+ }
+
+ protected boolean isNetty()
+ {
+ return false;
+ }
+
+ protected boolean isFileStorage()
+ {
+ return true;
+ }
+
+ public void testFailAllNodes() throws Exception
+ {
+ setupCluster();
+
+ startServers(3, 4, 5, 0, 1, 2);
+
+ setupSessionFactory(0, 3, isNetty(), false);
+ setupSessionFactory(1, 4, isNetty(), false);
+ setupSessionFactory(2, 5, isNetty(), false);
+
+ createQueue(0, "queues.testaddress", "queue0", null, true);
+ createQueue(1, "queues.testaddress", "queue0", null, true);
+ createQueue(2, "queues.testaddress", "queue0", null, true);
+
+ addConsumer(0, 0, "queue0", null);
+ addConsumer(1, 1, "queue0", null);
+ addConsumer(2, 2, "queue0", null);
+
+ waitForBindings(0, "queues.testaddress", 1, 1, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
+
+ waitForBindings(0, "queues.testaddress", 2, 2, false);
+ waitForBindings(1, "queues.testaddress", 2, 2, false);
+ waitForBindings(2, "queues.testaddress", 2, 2, false);
+
+ send(0, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ send(1, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ send(2, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ failNode(0);
+
+ // live nodes
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
+ // activated backup nodes
+ waitForBindings(3, "queues.testaddress", 1, 1, true);
+
+ // live nodes
+ waitForBindings(1, "queues.testaddress", 2, 2, false);
+ waitForBindings(2, "queues.testaddress", 2, 2, false);
+ // activated backup nodes
+ waitForBindings(3, "queues.testaddress", 2, 2, false);
+
+ log.info("** now sending");
+
+ send(0, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ send(1, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ send(2, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ failNode(1);
+
+ // live nodes
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
+ // activated backup nodes
+ waitForBindings(3, "queues.testaddress", 1, 1, true);
+ waitForBindings(4, "queues.testaddress", 1, 1, true);
+
+ // live nodes
+ waitForBindings(2, "queues.testaddress", 2, 2, false);
+ // activated backup nodes
+ waitForBindings(3, "queues.testaddress", 2, 2, false);
+ waitForBindings(4, "queues.testaddress", 2, 2, false);
+
+ send(0, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ send(1, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ send(2, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ failNode(2);
+
+ // activated backup nodes
+ waitForBindings(3, "queues.testaddress", 1, 1, true);
+ waitForBindings(4, "queues.testaddress", 1, 1, true);
+ waitForBindings(5, "queues.testaddress", 1, 1, true);
+
+ // activated backup nodes
+ waitForBindings(3, "queues.testaddress", 2, 2, false);
+ waitForBindings(4, "queues.testaddress", 2, 2, false);
+ waitForBindings(5, "queues.testaddress", 2, 2, false);
+
+ send(0, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ send(1, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ send(2, "queues.testaddress", 10, false, null);
+ verifyReceiveRoundRobinInSomeOrder(true, 10, 0, 1, 2);
+
+ removeConsumer(0);
+ removeConsumer(1);
+ removeConsumer(2);
+
+ stopServers();
+
+ log.info("*** test done");
+ }
+
+ protected void setupCluster() throws Exception
+ {
+ setupCluster(false);
+ }
+
+ protected void stopServers() throws Exception
+ {
+ closeAllConsumers();
+
+ closeAllSessionFactories();
+
+ stopServers(0, 1, 2, 3, 4, 5);
+ }
+
+ protected void failNode(int node) throws Exception
+ {
+ log.info("*** failing node " + node);
+
+ Map<String, Object> params = generateParams(node, isNetty());
+
+ TransportConfiguration serverTC;
+
+ if (isNetty())
+ {
+ serverTC = new TransportConfiguration(NETTY_CONNECTOR_FACTORY, params);
+ }
+ else
+ {
+ serverTC = new TransportConfiguration(INVM_CONNECTOR_FACTORY, params);
+ }
+
+ HornetQServer server = getServer(node);
+
+ //Prevent remoting service taking any more connections
+ server.getRemotingService().freeze();
+
+ //Stop it broadcasting
+ for (BroadcastGroup group: server.getClusterManager().getBroadcastGroups())
+ {
+ group.stop();
+ }
+
+ FailoverManagerImpl.failAllConnectionsForConnector(serverTC);
+
+ server.stop();
+ }
+
+}
Added: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/DiscoveryClusterWithBackupFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/DiscoveryClusterWithBackupFailoverTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/DiscoveryClusterWithBackupFailoverTest.java 2009-11-27 13:41:41 UTC (rev 8429)
@@ -0,0 +1,76 @@
+/*
+ * 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;
+
+import org.hornetq.core.logging.Logger;
+
+/**
+ * A DiscoveryClusterWithBackupFailoverTest
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class DiscoveryClusterWithBackupFailoverTest extends ClusterWithBackupFailoverTestBase
+{
+ private static final Logger log = Logger.getLogger(DiscoveryClusterWithBackupFailoverTest.class);
+
+ protected static final String groupAddress = "230.1.2.3";
+
+ protected static final int groupPort = 6745;
+
+ @Override
+ protected void setupCluster(final boolean forwardWhenNoConsumers) throws Exception
+ {
+ // The lives
+
+ setupDiscoveryClusterConnection("cluster0", 0, "dg1", "queues", forwardWhenNoConsumers, 1, isNetty());
+
+ setupDiscoveryClusterConnection("cluster1", 1, "dg1", "queues", forwardWhenNoConsumers, 1, isNetty());
+
+ setupDiscoveryClusterConnection("cluster2", 2, "dg1", "queues", forwardWhenNoConsumers, 1, isNetty());
+
+ // The backups
+
+ setupDiscoveryClusterConnection("cluster0", 3, "dg1", "queues", forwardWhenNoConsumers, 1, isNetty());
+
+ setupDiscoveryClusterConnection("cluster1", 4, "dg1", "queues", forwardWhenNoConsumers, 1, isNetty());
+
+ setupDiscoveryClusterConnection("cluster2", 5, "dg1", "queues", forwardWhenNoConsumers, 1, isNetty());
+ }
+
+ @Override
+ protected void setupServers() throws Exception
+ {
+ // The lives
+ setupServerWithDiscovery(0, groupAddress, groupPort, isFileStorage(), isNetty(), 3);
+ setupServerWithDiscovery(1, groupAddress, groupPort, isFileStorage(), isNetty(), 4);
+ setupServerWithDiscovery(2, groupAddress, groupPort, isFileStorage(), isNetty(), 5);
+
+ // The backups
+ setupServerWithDiscovery(3, groupAddress, groupPort, isFileStorage(), isNetty(), true);
+ setupServerWithDiscovery(4, groupAddress, groupPort, isFileStorage(), isNetty(), true);
+ setupServerWithDiscovery(5, groupAddress, groupPort, isFileStorage(), isNetty(), true);
+ }
+
+}
Added: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FileStorageDiscoveryClusterWithBackupFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FileStorageDiscoveryClusterWithBackupFailoverTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FileStorageDiscoveryClusterWithBackupFailoverTest.java 2009-11-27 13:41:41 UTC (rev 8429)
@@ -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@jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class FileStorageDiscoveryClusterWithBackupFailoverTest extends DiscoveryClusterWithBackupFailoverTest
+{
+ protected boolean isFileStorage()
+ {
+ return true;
+ }
+}
Added: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyDiscoveryClusterWithBackupFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyDiscoveryClusterWithBackupFailoverTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyDiscoveryClusterWithBackupFailoverTest.java 2009-11-27 13:41:41 UTC (rev 8429)
@@ -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 NettyDiscoveryClusterWithBackupFailoverTest
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class NettyDiscoveryClusterWithBackupFailoverTest extends DiscoveryClusterWithBackupFailoverTest
+{
+ protected boolean isNetty()
+ {
+ return true;
+ }
+}
Added: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyFileStorageDiscoveryClusterWithBackupFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyFileStorageDiscoveryClusterWithBackupFailoverTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/NettyFileStorageDiscoveryClusterWithBackupFailoverTest.java 2009-11-27 13:41:41 UTC (rev 8429)
@@ -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 NettyFileStorageDiscoveryClusterWithBackupFailoverTest
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class NettyFileStorageDiscoveryClusterWithBackupFailoverTest extends DiscoveryClusterWithBackupFailoverTest
+{
+ protected boolean isNetty()
+ {
+ return true;
+ }
+
+ protected boolean isFileStorage()
+ {
+ return true;
+ }
+}
\ No newline at end of file
15 years
JBoss hornetq SVN: r8428 - trunk/tests/src/org/hornetq/tests/integration/cluster/distribution.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-11-27 06:54:46 -0500 (Fri, 27 Nov 2009)
New Revision: 8428
Modified:
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
Log:
display more contextual info if the assertion fails
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-11-27 10:39:35 UTC (rev 8427)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2009-11-27 11:54:46 UTC (rev 8428)
@@ -809,7 +809,9 @@
if (prevCount != null)
{
- assertEquals(prevCount + consumerIDs.length, count);
+ assertEquals("consumer " + i + " received unround-robined message (previous was " + prevCount + ")",
+ prevCount + consumerIDs.length,
+ count);
}
assertFalse(counts.contains(count));
15 years
JBoss hornetq SVN: r8427 - trunk.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-11-27 05:39:35 -0500 (Fri, 27 Nov 2009)
New Revision: 8427
Modified:
trunk/build-hornetq.xml
Log:
readded cluster with backup tests but excluded them from integratio-tests ant target
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2009-11-27 10:28:39 UTC (rev 8426)
+++ trunk/build-hornetq.xml 2009-11-27 10:39:35 UTC (rev 8427)
@@ -1221,7 +1221,7 @@
<fileset dir="${test.classes.dir}">
<!-- <exclude name="**/integration/http/*" /> -->
<!-- cluster tests with backup are brittled and are temporarily excluded -->
- <exclude name="**/cluster/distribution/*WithBackupTest" />
+ <exclude name="**/cluster/distribution/*WithBackupTest.class" />
<include name="${tests.param}"/>
</fileset>
</batchtest>
15 years
JBoss hornetq SVN: r8426 - in trunk: tests/src/org/hornetq/tests/integration/cluster/distribution and 1 other directory.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-11-27 05:28:39 -0500 (Fri, 27 Nov 2009)
New Revision: 8426
Added:
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterWithBackupTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
Modified:
trunk/build-hornetq.xml
Log:
readded cluster with backup tests but excluded them from integratio-tests ant target
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2009-11-27 10:15:37 UTC (rev 8425)
+++ trunk/build-hornetq.xml 2009-11-27 10:28:39 UTC (rev 8426)
@@ -1220,6 +1220,8 @@
<formatter type="plain" usefile="${junit.formatter.usefile}"/>
<fileset dir="${test.classes.dir}">
<!-- <exclude name="**/integration/http/*" /> -->
+ <!-- cluster tests with backup are brittled and are temporarily excluded -->
+ <exclude name="**/cluster/distribution/*WithBackupTest" />
<include name="${tests.param}"/>
</fileset>
</batchtest>
Added: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterWithBackupTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterWithBackupTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterWithBackupTest.java 2009-11-27 10:28:39 UTC (rev 8426)
@@ -0,0 +1,144 @@
+/*
+ * 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.distribution;
+
+import org.hornetq.core.logging.Logger;
+
+/**
+ *
+ * A ClusterWithBackupTest
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ * Created 9 Mar 2009 16:31:21
+ *
+ *
+ */
+public class ClusterWithBackupTest extends ClusterTestBase
+{
+ private static final Logger log = Logger.getLogger(ClusterWithBackupTest.class);
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ setupServers();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ stopServers();
+
+ super.tearDown();
+ }
+
+ protected boolean isNetty()
+ {
+ return false;
+ }
+
+ protected boolean isFileStorage()
+ {
+ return false;
+ }
+
+ public void testBasicRoundRobin() throws Exception
+ {
+ setupCluster();
+
+ startServers(0, 1, 2, 3, 4, 5);
+
+ setupSessionFactory(3, isNetty());
+ setupSessionFactory(4, isNetty());
+ setupSessionFactory(5, isNetty());
+
+ createQueue(3, "queues.testaddress", "queue0", null, false);
+ createQueue(4, "queues.testaddress", "queue0", null, false);
+ createQueue(5, "queues.testaddress", "queue0", null, false);
+
+ addConsumer(0, 3, "queue0", null);
+ addConsumer(1, 4, "queue0", null);
+ addConsumer(2, 5, "queue0", null);
+
+ waitForBindings(3, "queues.testaddress", 1, 1, true);
+ waitForBindings(4, "queues.testaddress", 1, 1, true);
+ waitForBindings(5, "queues.testaddress", 1, 1, true);
+
+ waitForBindings(3, "queues.testaddress", 2, 2, false);
+ waitForBindings(4, "queues.testaddress", 2, 2, false);
+ waitForBindings(5, "queues.testaddress", 2, 2, false);
+
+ send(3, "queues.testaddress", 100, false, null);
+
+ verifyReceiveRoundRobinInSomeOrder(100, 0, 1, 2);
+
+ verifyNotReceive(0, 0, 1, 2);
+ }
+
+ protected void setupCluster() throws Exception
+ {
+ setupCluster(false);
+ }
+
+ protected void setupCluster(final boolean forwardWhenNoConsumers) throws Exception
+ {
+ setupClusterConnection("cluster0", "queues", forwardWhenNoConsumers, 1, isNetty(), 3, 4, 5);
+
+ setupClusterConnection("cluster1", "queues", forwardWhenNoConsumers, 1, isNetty(), 4, 3, 5);
+
+ setupClusterConnection("cluster2", "queues", forwardWhenNoConsumers, 1, isNetty(), 5, 3, 4);
+
+
+ setupClusterConnection("cluster0", "queues", forwardWhenNoConsumers, 1, isNetty(), 0, 4, 5);
+
+ setupClusterConnection("cluster1", "queues", forwardWhenNoConsumers, 1, isNetty(), 1, 3, 5);
+
+ setupClusterConnection("cluster2", "queues", forwardWhenNoConsumers, 1, isNetty(), 2, 3, 4);
+ }
+
+ protected void setupServers() throws Exception
+ {
+ //The backups
+ setupServer(0, isFileStorage(), isNetty(), true);
+ setupServer(1, isFileStorage(), isNetty(), true);
+ setupServer(2, isFileStorage(), isNetty(), true);
+
+ //The lives
+ setupServer(3, isFileStorage(), isNetty(), 0);
+ setupServer(4, isFileStorage(), isNetty(), 1);
+ setupServer(5, isFileStorage(), isNetty(), 2);
+
+ }
+
+ protected void stopServers() throws Exception
+ {
+ closeAllConsumers();
+
+ closeAllSessionFactories();
+
+ stopServers(0, 1, 2, 3, 4, 5);
+ }
+
+}
Added: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java 2009-11-27 10:28:39 UTC (rev 8426)
@@ -0,0 +1,45 @@
+/*
+ * 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.distribution;
+
+/**
+ * A NettyFileStorageSymmetricClusterWithBackupTest
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class NettyFileStorageSymmetricClusterWithBackupTest extends SymmetricClusterWithBackupTest
+{
+ protected boolean isNetty()
+ {
+ return true;
+ }
+
+ protected boolean isFileStorage()
+ {
+ return true;
+ }
+
+}
Added: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java 2009-11-27 10:28:39 UTC (rev 8426)
@@ -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.distribution;
+
+/**
+ * A NettySymmetricClusterWithBackupTest
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class NettySymmetricClusterWithBackupTest extends SymmetricClusterWithBackupTest
+{
+ protected boolean isNetty()
+ {
+ return true;
+ }
+
+ protected boolean isFileStorage()
+ {
+ return false;
+ }
+}
Added: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java 2009-11-27 10:28:39 UTC (rev 8426)
@@ -0,0 +1,603 @@
+/*
+ * 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.distribution;
+
+import org.hornetq.core.logging.Logger;
+
+/**
+ * A SymmetricClusterWithBackupTest
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ * Created 13 Mar 2009 11:00:31
+ *
+ *
+ */
+public class SymmetricClusterWithBackupTest extends SymmetricClusterTest
+{
+ private static final Logger log = Logger.getLogger(SymmetricClusterWithBackupTest.class);
+
+ public void testStopAllStartAll() throws Throwable
+ {
+ try
+ {
+ setupCluster();
+
+ startServers();
+
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
+ setupSessionFactory(3, isNetty());
+ setupSessionFactory(4, isNetty());
+
+ createQueue(0, "queues.testaddress", "queue0", null, false);
+ createQueue(1, "queues.testaddress", "queue0", null, false);
+ createQueue(2, "queues.testaddress", "queue0", null, false);
+ createQueue(3, "queues.testaddress", "queue0", null, false);
+ createQueue(4, "queues.testaddress", "queue0", null, false);
+
+ addConsumer(0, 0, "queue0", null);
+ addConsumer(1, 1, "queue0", null);
+ addConsumer(2, 2, "queue0", null);
+ addConsumer(3, 3, "queue0", null);
+ addConsumer(4, 4, "queue0", null);
+
+ waitForBindings(0, "queues.testaddress", 1, 1, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
+ waitForBindings(3, "queues.testaddress", 1, 1, true);
+ waitForBindings(4, "queues.testaddress", 1, 1, true);
+
+ waitForBindings(0, "queues.testaddress", 4, 4, false);
+ waitForBindings(1, "queues.testaddress", 4, 4, false);
+ waitForBindings(2, "queues.testaddress", 4, 4, false);
+ waitForBindings(3, "queues.testaddress", 4, 4, false);
+ waitForBindings(4, "queues.testaddress", 4, 4, false);
+
+ System.out.println("waited for all bindings");
+
+ send(0, "queues.testaddress", 10, false, null);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 0, 1, 2, 3, 4);
+
+ verifyNotReceive(0, 1, 2, 3, 4);
+
+ closeAllConsumers();
+
+ closeAllSessionFactories();
+
+ stopServers();
+
+ startServers();
+
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
+ setupSessionFactory(3, isNetty());
+ setupSessionFactory(4, isNetty());
+
+ createQueue(0, "queues.testaddress", "queue0", null, false);
+ createQueue(1, "queues.testaddress", "queue0", null, false);
+ createQueue(2, "queues.testaddress", "queue0", null, false);
+ createQueue(3, "queues.testaddress", "queue0", null, false);
+ createQueue(4, "queues.testaddress", "queue0", null, false);
+
+ addConsumer(0, 0, "queue0", null);
+ addConsumer(1, 1, "queue0", null);
+ addConsumer(2, 2, "queue0", null);
+ addConsumer(3, 3, "queue0", null);
+ addConsumer(4, 4, "queue0", null);
+
+ waitForBindings(0, "queues.testaddress", 1, 1, true);
+ waitForBindings(1, "queues.testaddress", 1, 1, true);
+ waitForBindings(2, "queues.testaddress", 1, 1, true);
+ waitForBindings(3, "queues.testaddress", 1, 1, true);
+ waitForBindings(4, "queues.testaddress", 1, 1, true);
+
+ waitForBindings(0, "queues.testaddress", 4, 4, false);
+ waitForBindings(1, "queues.testaddress", 4, 4, false);
+ waitForBindings(2, "queues.testaddress", 4, 4, false);
+ waitForBindings(3, "queues.testaddress", 4, 4, false);
+ waitForBindings(4, "queues.testaddress", 4, 4, false);
+
+ send(0, "queues.testaddress", 10, false, null);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 0, 1, 2, 3, 4);
+
+ this.verifyNotReceive(0, 1, 2, 3, 4);
+
+
+ closeAllConsumers();
+
+ closeAllSessionFactories();
+ }
+ catch (Throwable e)
+ {
+ System.out.println(threadDump("SymmetricClusterWithBackupTest::testStopAllStartAll"));
+ throw e;
+ }
+ }
+
+ @Override
+ public void testMixtureLoadBalancedAndNonLoadBalancedQueuesAddQueuesAndConsumersBeforeAllServersAreStarted() throws Exception
+ {
+ setupCluster();
+
+ startServers(5, 0);
+
+ setupSessionFactory(0, isNetty());
+
+ createQueue(0, "queues.testaddress", "queue0", null, false);
+ createQueue(0, "queues.testaddress", "queue5", null, false);
+ createQueue(0, "queues.testaddress", "queue10", null, false);
+ createQueue(0, "queues.testaddress", "queue15", null, false);
+ createQueue(0, "queues.testaddress", "queue17", null, false);
+
+ addConsumer(0, 0, "queue0", null);
+ addConsumer(5, 0, "queue5", null);
+
+ startServers(6, 1);
+ setupSessionFactory(1, isNetty());
+
+ createQueue(1, "queues.testaddress", "queue1", null, false);
+ createQueue(1, "queues.testaddress", "queue6", null, false);
+ createQueue(1, "queues.testaddress", "queue11", null, false);
+ createQueue(1, "queues.testaddress", "queue15", null, false);
+ createQueue(1, "queues.testaddress", "queue17", null, false);
+
+ addConsumer(1, 1, "queue1", null);
+ addConsumer(6, 1, "queue6", null);
+ addConsumer(11, 1, "queue11", null);
+ addConsumer(16, 1, "queue15", null);
+
+ startServers(7, 2);
+ setupSessionFactory(2, isNetty());
+
+ createQueue(2, "queues.testaddress", "queue2", null, false);
+ createQueue(2, "queues.testaddress", "queue7", null, false);
+ createQueue(2, "queues.testaddress", "queue12", null, false);
+ createQueue(2, "queues.testaddress", "queue15", null, false);
+ createQueue(2, "queues.testaddress", "queue16", null, false);
+
+ addConsumer(2, 2, "queue2", null);
+ addConsumer(7, 2, "queue7", null);
+ addConsumer(12, 2, "queue12", null);
+ addConsumer(17, 2, "queue15", null);
+
+ startServers(8, 3);
+ setupSessionFactory(3, isNetty());
+
+ createQueue(3, "queues.testaddress", "queue3", null, false);
+ createQueue(3, "queues.testaddress", "queue8", null, false);
+ createQueue(3, "queues.testaddress", "queue13", null, false);
+ createQueue(3, "queues.testaddress", "queue15", null, false);
+ createQueue(3, "queues.testaddress", "queue16", null, false);
+ createQueue(3, "queues.testaddress", "queue18", null, false);
+
+ addConsumer(3, 3, "queue3", null);
+ addConsumer(8, 3, "queue8", null);
+ addConsumer(13, 3, "queue13", null);
+ addConsumer(18, 3, "queue15", null);
+
+ startServers(9, 4);
+ setupSessionFactory(4, isNetty());
+
+ createQueue(4, "queues.testaddress", "queue4", null, false);
+ createQueue(4, "queues.testaddress", "queue9", null, false);
+ createQueue(4, "queues.testaddress", "queue14", null, false);
+ createQueue(4, "queues.testaddress", "queue15", null, false);
+ createQueue(4, "queues.testaddress", "queue16", null, false);
+ createQueue(4, "queues.testaddress", "queue17", null, false);
+ createQueue(4, "queues.testaddress", "queue18", null, false);
+
+ addConsumer(4, 4, "queue4", null);
+ addConsumer(9, 4, "queue9", null);
+ addConsumer(10, 0, "queue10", null);
+ addConsumer(14, 4, "queue14", null);
+
+ addConsumer(15, 0, "queue15", null);
+ addConsumer(19, 4, "queue15", null);
+
+ addConsumer(20, 2, "queue16", null);
+ addConsumer(21, 3, "queue16", null);
+ addConsumer(22, 4, "queue16", null);
+
+ addConsumer(23, 0, "queue17", null);
+ addConsumer(24, 1, "queue17", null);
+ addConsumer(25, 4, "queue17", null);
+
+ addConsumer(26, 3, "queue18", null);
+ addConsumer(27, 4, "queue18", null);
+
+ waitForBindings(0, "queues.testaddress", 5, 5, true);
+ waitForBindings(1, "queues.testaddress", 5, 5, true);
+ waitForBindings(2, "queues.testaddress", 5, 5, true);
+ waitForBindings(3, "queues.testaddress", 6, 6, true);
+ waitForBindings(4, "queues.testaddress", 7, 7, true);
+
+ waitForBindings(0, "queues.testaddress", 23, 23, false);
+ waitForBindings(1, "queues.testaddress", 23, 23, false);
+ waitForBindings(2, "queues.testaddress", 23, 23, false);
+ waitForBindings(3, "queues.testaddress", 22, 22, false);
+ waitForBindings(4, "queues.testaddress", 21, 21, false);
+
+ send(0, "queues.testaddress", 10, false, null);
+
+ verifyReceiveAll(10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 15, 16, 17, 18, 19);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 20, 21, 22);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 23, 24, 25);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 26, 27);
+
+ closeAllConsumers();
+
+ closeAllSessionFactories();
+ }
+
+ @Override
+ public void testStartStopServers() throws Exception
+ {
+ setupCluster();
+
+ startServers();
+
+ log.info("setup session factories: ");
+
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(1, isNetty());
+ setupSessionFactory(2, isNetty());
+ setupSessionFactory(3, isNetty());
+ setupSessionFactory(4, isNetty());
+
+ createQueue(0, "queues.testaddress", "queue0", null, false);
+ createQueue(1, "queues.testaddress", "queue1", null, false);
+ createQueue(2, "queues.testaddress", "queue2", null, false);
+ createQueue(3, "queues.testaddress", "queue3", null, false);
+ createQueue(4, "queues.testaddress", "queue4", null, false);
+
+ createQueue(0, "queues.testaddress", "queue5", null, false);
+ createQueue(1, "queues.testaddress", "queue6", null, false);
+ createQueue(2, "queues.testaddress", "queue7", null, false);
+ createQueue(3, "queues.testaddress", "queue8", null, false);
+ createQueue(4, "queues.testaddress", "queue9", null, false);
+
+ createQueue(0, "queues.testaddress", "queue10", null, false);
+ createQueue(1, "queues.testaddress", "queue11", null, false);
+ createQueue(2, "queues.testaddress", "queue12", null, false);
+ createQueue(3, "queues.testaddress", "queue13", null, false);
+ createQueue(4, "queues.testaddress", "queue14", null, false);
+
+ createQueue(0, "queues.testaddress", "queue15", null, false);
+ createQueue(1, "queues.testaddress", "queue15", null, false);
+ createQueue(2, "queues.testaddress", "queue15", null, false);
+ createQueue(3, "queues.testaddress", "queue15", null, false);
+ createQueue(4, "queues.testaddress", "queue15", null, false);
+
+ createQueue(2, "queues.testaddress", "queue16", null, false);
+ createQueue(3, "queues.testaddress", "queue16", null, false);
+ createQueue(4, "queues.testaddress", "queue16", null, false);
+
+ createQueue(0, "queues.testaddress", "queue17", null, false);
+ createQueue(1, "queues.testaddress", "queue17", null, false);
+ createQueue(4, "queues.testaddress", "queue17", null, false);
+
+ createQueue(3, "queues.testaddress", "queue18", null, false);
+ createQueue(4, "queues.testaddress", "queue18", null, false);
+
+ addConsumer(0, 0, "queue0", null);
+ addConsumer(1, 1, "queue1", null);
+ addConsumer(2, 2, "queue2", null);
+ addConsumer(3, 3, "queue3", null);
+ addConsumer(4, 4, "queue4", null);
+
+ addConsumer(5, 0, "queue5", null);
+ addConsumer(6, 1, "queue6", null);
+ addConsumer(7, 2, "queue7", null);
+ addConsumer(8, 3, "queue8", null);
+ addConsumer(9, 4, "queue9", null);
+
+ addConsumer(10, 0, "queue10", null);
+ addConsumer(11, 1, "queue11", null);
+ addConsumer(12, 2, "queue12", null);
+ addConsumer(13, 3, "queue13", null);
+ addConsumer(14, 4, "queue14", null);
+
+ addConsumer(15, 0, "queue15", null);
+ addConsumer(16, 1, "queue15", null);
+ addConsumer(17, 2, "queue15", null);
+ addConsumer(18, 3, "queue15", null);
+ addConsumer(19, 4, "queue15", null);
+
+ addConsumer(20, 2, "queue16", null);
+ addConsumer(21, 3, "queue16", null);
+ addConsumer(22, 4, "queue16", null);
+
+ addConsumer(23, 0, "queue17", null);
+ addConsumer(24, 1, "queue17", null);
+ addConsumer(25, 4, "queue17", null);
+
+ addConsumer(26, 3, "queue18", null);
+ addConsumer(27, 4, "queue18", null);
+
+ log.info("wait for bindings...");
+
+ waitForBindings(0, "queues.testaddress", 5, 5, true);
+ waitForBindings(1, "queues.testaddress", 5, 5, true);
+ waitForBindings(2, "queues.testaddress", 5, 5, true);
+ waitForBindings(3, "queues.testaddress", 6, 6, true);
+ waitForBindings(4, "queues.testaddress", 7, 7, true);
+
+ waitForBindings(0, "queues.testaddress", 23, 23, false);
+ waitForBindings(1, "queues.testaddress", 23, 23, false);
+ waitForBindings(2, "queues.testaddress", 23, 23, false);
+ waitForBindings(3, "queues.testaddress", 22, 22, false);
+ waitForBindings(4, "queues.testaddress", 21, 21, false);
+
+ log.info("send and receive messages");
+
+ send(0, "queues.testaddress", 10, false, null);
+
+ verifyReceiveAll(10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 15, 16, 17, 18, 19);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 20, 21, 22);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 23, 24, 25);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 26, 27);
+
+ removeConsumer(0);
+ removeConsumer(5);
+ removeConsumer(10);
+ removeConsumer(15);
+ removeConsumer(23);
+ removeConsumer(3);
+ removeConsumer(8);
+ removeConsumer(13);
+ removeConsumer(18);
+ removeConsumer(21);
+ removeConsumer(26);
+
+ closeSessionFactory(0);
+ closeSessionFactory(3);
+
+ stopServers(0, 3, 5, 8);
+
+ startServers(5, 8, 0, 3);
+
+ Thread.sleep(2000);
+
+ setupSessionFactory(0, isNetty());
+ setupSessionFactory(3, isNetty());
+
+ createQueue(0, "queues.testaddress", "queue0", null, false);
+ createQueue(3, "queues.testaddress", "queue3", null, false);
+
+ createQueue(0, "queues.testaddress", "queue5", null, false);
+ createQueue(3, "queues.testaddress", "queue8", null, false);
+
+ createQueue(0, "queues.testaddress", "queue10", null, false);
+ createQueue(3, "queues.testaddress", "queue13", null, false);
+
+ createQueue(0, "queues.testaddress", "queue15", null, false);
+ createQueue(3, "queues.testaddress", "queue15", null, false);
+
+ createQueue(3, "queues.testaddress", "queue16", null, false);
+
+ createQueue(0, "queues.testaddress", "queue17", null, false);
+
+ createQueue(3, "queues.testaddress", "queue18", null, false);
+
+ addConsumer(0, 0, "queue0", null);
+ addConsumer(3, 3, "queue3", null);
+
+ addConsumer(5, 0, "queue5", null);
+ addConsumer(8, 3, "queue8", null);
+
+ addConsumer(10, 0, "queue10", null);
+ addConsumer(13, 3, "queue13", null);
+
+ addConsumer(15, 0, "queue15", null);
+ addConsumer(18, 3, "queue15", null);
+
+ addConsumer(21, 3, "queue16", null);
+
+ addConsumer(23, 0, "queue17", null);
+
+ addConsumer(26, 3, "queue18", null);
+
+ waitForBindings(0, "queues.testaddress", 5, 5, true);
+ waitForBindings(1, "queues.testaddress", 5, 5, true);
+ waitForBindings(2, "queues.testaddress", 5, 5, true);
+ waitForBindings(3, "queues.testaddress", 6, 6, true);
+ waitForBindings(4, "queues.testaddress", 7, 7, true);
+
+ waitForBindings(0, "queues.testaddress", 23, 23, false);
+ waitForBindings(1, "queues.testaddress", 23, 23, false);
+ waitForBindings(2, "queues.testaddress", 23, 23, false);
+ waitForBindings(3, "queues.testaddress", 22, 22, false);
+ waitForBindings(4, "queues.testaddress", 21, 21, false);
+
+ send(0, "queues.testaddress", 10, false, null);
+
+ verifyReceiveAll(10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 15, 16, 17, 18, 19);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 20, 21, 22);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 23, 24, 25);
+
+ verifyReceiveRoundRobinInSomeOrder(10, 26, 27);
+
+ closeAllConsumers();
+
+ closeAllSessionFactories();
+ }
+
+ @Override
+ protected void setupCluster(final boolean forwardWhenNoConsumers) throws Exception
+ {
+ // The lives
+ setupClusterConnectionWithBackups("cluster0",
+ "queues",
+ forwardWhenNoConsumers,
+ 1,
+ isNetty(),
+ 0,
+ new int[] { 1, 2, 3, 4 },
+ new int[] { 6, 7, 8, 9 });
+
+ setupClusterConnectionWithBackups("cluster1",
+ "queues",
+ forwardWhenNoConsumers,
+ 1,
+ isNetty(),
+ 1,
+ new int[] { 0, 2, 3, 4 },
+ new int[] { 5, 7, 8, 9 });
+
+ setupClusterConnectionWithBackups("cluster2",
+ "queues",
+ forwardWhenNoConsumers,
+ 1,
+ isNetty(),
+ 2,
+ new int[] { 0, 1, 3, 4 },
+ new int[] { 5, 6, 8, 9 });
+
+ setupClusterConnectionWithBackups("cluster3",
+ "queues",
+ forwardWhenNoConsumers,
+ 1,
+ isNetty(),
+ 3,
+ new int[] { 0, 1, 2, 4 },
+ new int[] { 5, 6, 7, 9 });
+
+ setupClusterConnectionWithBackups("cluster4",
+ "queues",
+ forwardWhenNoConsumers,
+ 1,
+ isNetty(),
+ 4,
+ new int[] { 0, 1, 2, 3 },
+ new int[] { 5, 6, 7, 8 });
+
+ // The backups
+
+ setupClusterConnectionWithBackups("cluster0",
+ "queues",
+ forwardWhenNoConsumers,
+ 1,
+ isNetty(),
+ 5,
+ new int[] { 1, 2, 3, 4 },
+ new int[] { 6, 7, 8, 9 });
+
+ setupClusterConnectionWithBackups("cluster1",
+ "queues",
+ forwardWhenNoConsumers,
+ 1,
+ isNetty(),
+ 6,
+ new int[] { 0, 2, 3, 4 },
+ new int[] { 5, 7, 8, 9 });
+
+ setupClusterConnectionWithBackups("cluster2",
+ "queues",
+ forwardWhenNoConsumers,
+ 1,
+ isNetty(),
+ 7,
+ new int[] { 0, 1, 3, 4 },
+ new int[] { 5, 6, 8, 9 });
+
+ setupClusterConnectionWithBackups("cluster3",
+ "queues",
+ forwardWhenNoConsumers,
+ 1,
+ isNetty(),
+ 8,
+ new int[] { 0, 1, 2, 4 },
+ new int[] { 5, 6, 7, 9 });
+
+ setupClusterConnectionWithBackups("cluster4",
+ "queues",
+ forwardWhenNoConsumers,
+ 1,
+ isNetty(),
+ 9,
+ new int[] { 0, 1, 2, 3 },
+ new int[] { 5, 6, 7, 8 });
+ }
+
+ @Override
+ protected void setupServers() throws Exception
+ {
+ // The backups
+ setupServer(5, isFileStorage(), isNetty(), true);
+ setupServer(6, isFileStorage(), isNetty(), true);
+ setupServer(7, isFileStorage(), isNetty(), true);
+ setupServer(8, isFileStorage(), isNetty(), true);
+ setupServer(9, isFileStorage(), isNetty(), true);
+
+ // The lives
+ setupServer(0, isFileStorage(), isNetty(), 5);
+ setupServer(1, isFileStorage(), isNetty(), 6);
+ setupServer(2, isFileStorage(), isNetty(), 7);
+ setupServer(3, isFileStorage(), isNetty(), 8);
+ setupServer(4, isFileStorage(), isNetty(), 9);
+ }
+
+ @Override
+ protected void startServers() throws Exception
+ {
+ // Need to set backup, since when restarting backup after it has failed over, backup will have been set to false
+
+ getServer(5).getConfiguration().setBackup(true);
+ getServer(6).getConfiguration().setBackup(true);
+ getServer(7).getConfiguration().setBackup(true);
+ getServer(8).getConfiguration().setBackup(true);
+ getServer(9).getConfiguration().setBackup(true);
+
+ startServers(5, 6, 7, 8, 9, 0, 1, 2, 3, 4);
+ }
+
+ @Override
+ protected void stopServers() throws Exception
+ {
+ closeAllConsumers();
+
+ closeAllSessionFactories();
+
+ stopServers(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
+ }
+
+}
15 years
JBoss hornetq SVN: r8425 - trunk/tests/src/org/hornetq/tests/integration/cluster/distribution.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-11-27 05:15:37 -0500 (Fri, 27 Nov 2009)
New Revision: 8425
Removed:
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterWithBackupTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
Log:
temporarily removed hanging tests
Deleted: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterWithBackupTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterWithBackupTest.java 2009-11-27 09:01:32 UTC (rev 8424)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/ClusterWithBackupTest.java 2009-11-27 10:15:37 UTC (rev 8425)
@@ -1,144 +0,0 @@
-/*
- * 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.distribution;
-
-import org.hornetq.core.logging.Logger;
-
-/**
- *
- * A ClusterWithBackupTest
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- * Created 9 Mar 2009 16:31:21
- *
- *
- */
-public class ClusterWithBackupTest extends ClusterTestBase
-{
- private static final Logger log = Logger.getLogger(ClusterWithBackupTest.class);
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- setupServers();
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- stopServers();
-
- super.tearDown();
- }
-
- protected boolean isNetty()
- {
- return false;
- }
-
- protected boolean isFileStorage()
- {
- return false;
- }
-
- public void testBasicRoundRobin() throws Exception
- {
- setupCluster();
-
- startServers(0, 1, 2, 3, 4, 5);
-
- setupSessionFactory(3, isNetty());
- setupSessionFactory(4, isNetty());
- setupSessionFactory(5, isNetty());
-
- createQueue(3, "queues.testaddress", "queue0", null, false);
- createQueue(4, "queues.testaddress", "queue0", null, false);
- createQueue(5, "queues.testaddress", "queue0", null, false);
-
- addConsumer(0, 3, "queue0", null);
- addConsumer(1, 4, "queue0", null);
- addConsumer(2, 5, "queue0", null);
-
- waitForBindings(3, "queues.testaddress", 1, 1, true);
- waitForBindings(4, "queues.testaddress", 1, 1, true);
- waitForBindings(5, "queues.testaddress", 1, 1, true);
-
- waitForBindings(3, "queues.testaddress", 2, 2, false);
- waitForBindings(4, "queues.testaddress", 2, 2, false);
- waitForBindings(5, "queues.testaddress", 2, 2, false);
-
- send(3, "queues.testaddress", 100, false, null);
-
- verifyReceiveRoundRobinInSomeOrder(100, 0, 1, 2);
-
- verifyNotReceive(0, 0, 1, 2);
- }
-
- protected void setupCluster() throws Exception
- {
- setupCluster(false);
- }
-
- protected void setupCluster(final boolean forwardWhenNoConsumers) throws Exception
- {
- setupClusterConnection("cluster0", "queues", forwardWhenNoConsumers, 1, isNetty(), 3, 4, 5);
-
- setupClusterConnection("cluster1", "queues", forwardWhenNoConsumers, 1, isNetty(), 4, 3, 5);
-
- setupClusterConnection("cluster2", "queues", forwardWhenNoConsumers, 1, isNetty(), 5, 3, 4);
-
-
- setupClusterConnection("cluster0", "queues", forwardWhenNoConsumers, 1, isNetty(), 0, 4, 5);
-
- setupClusterConnection("cluster1", "queues", forwardWhenNoConsumers, 1, isNetty(), 1, 3, 5);
-
- setupClusterConnection("cluster2", "queues", forwardWhenNoConsumers, 1, isNetty(), 2, 3, 4);
- }
-
- protected void setupServers() throws Exception
- {
- //The backups
- setupServer(0, isFileStorage(), isNetty(), true);
- setupServer(1, isFileStorage(), isNetty(), true);
- setupServer(2, isFileStorage(), isNetty(), true);
-
- //The lives
- setupServer(3, isFileStorage(), isNetty(), 0);
- setupServer(4, isFileStorage(), isNetty(), 1);
- setupServer(5, isFileStorage(), isNetty(), 2);
-
- }
-
- protected void stopServers() throws Exception
- {
- closeAllConsumers();
-
- closeAllSessionFactories();
-
- stopServers(3, 4, 5, 0, 1, 2);
- }
-
-}
Deleted: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java 2009-11-27 09:01:32 UTC (rev 8424)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/SymmetricClusterWithBackupTest.java 2009-11-27 10:15:37 UTC (rev 8425)
@@ -1,828 +0,0 @@
-/*
- * 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.distribution;
-
-import org.hornetq.core.logging.Logger;
-
-/**
- * A SymmetricClusterWithBackupTest
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- * Created 13 Mar 2009 11:00:31
- *
- *
- */
-public class SymmetricClusterWithBackupTest extends SymmetricClusterTest
-{
- private static final Logger log = Logger.getLogger(SymmetricClusterWithBackupTest.class);
-
- public void testStopAllStartAll() throws Throwable
- {
- try
- {
- setupCluster();
-
- startServers();
-
- setupSessionFactory(0, isNetty());
- setupSessionFactory(1, isNetty());
- setupSessionFactory(2, isNetty());
- setupSessionFactory(3, isNetty());
- setupSessionFactory(4, isNetty());
-
- createQueue(0, "queues.testaddress", "queue0", null, false);
- createQueue(1, "queues.testaddress", "queue0", null, false);
- createQueue(2, "queues.testaddress", "queue0", null, false);
- createQueue(3, "queues.testaddress", "queue0", null, false);
- createQueue(4, "queues.testaddress", "queue0", null, false);
-
- addConsumer(0, 0, "queue0", null);
- addConsumer(1, 1, "queue0", null);
- addConsumer(2, 2, "queue0", null);
- addConsumer(3, 3, "queue0", null);
- addConsumer(4, 4, "queue0", null);
-
- waitForBindings(0, "queues.testaddress", 1, 1, true);
- waitForBindings(1, "queues.testaddress", 1, 1, true);
- waitForBindings(2, "queues.testaddress", 1, 1, true);
- waitForBindings(3, "queues.testaddress", 1, 1, true);
- waitForBindings(4, "queues.testaddress", 1, 1, true);
-
- waitForBindings(0, "queues.testaddress", 4, 4, false);
- waitForBindings(1, "queues.testaddress", 4, 4, false);
- waitForBindings(2, "queues.testaddress", 4, 4, false);
- waitForBindings(3, "queues.testaddress", 4, 4, false);
- waitForBindings(4, "queues.testaddress", 4, 4, false);
-
- System.out.println("waited for all bindings");
-
- send(0, "queues.testaddress", 10, false, null);
-
- verifyReceiveRoundRobinInSomeOrder(10, 0, 1, 2, 3, 4);
-
- verifyNotReceive(0, 1, 2, 3, 4);
-
- closeAllConsumers();
-
- closeAllSessionFactories();
-
- stopServers();
-
- startServers();
-
- setupSessionFactory(0, isNetty());
- setupSessionFactory(1, isNetty());
- setupSessionFactory(2, isNetty());
- setupSessionFactory(3, isNetty());
- setupSessionFactory(4, isNetty());
-
- createQueue(0, "queues.testaddress", "queue0", null, false);
- createQueue(1, "queues.testaddress", "queue0", null, false);
- createQueue(2, "queues.testaddress", "queue0", null, false);
- createQueue(3, "queues.testaddress", "queue0", null, false);
- createQueue(4, "queues.testaddress", "queue0", null, false);
-
- addConsumer(0, 0, "queue0", null);
- addConsumer(1, 1, "queue0", null);
- addConsumer(2, 2, "queue0", null);
- addConsumer(3, 3, "queue0", null);
- addConsumer(4, 4, "queue0", null);
-
- waitForBindings(0, "queues.testaddress", 1, 1, true);
- waitForBindings(1, "queues.testaddress", 1, 1, true);
- waitForBindings(2, "queues.testaddress", 1, 1, true);
- waitForBindings(3, "queues.testaddress", 1, 1, true);
- waitForBindings(4, "queues.testaddress", 1, 1, true);
-
- waitForBindings(0, "queues.testaddress", 4, 4, false);
- waitForBindings(1, "queues.testaddress", 4, 4, false);
- waitForBindings(2, "queues.testaddress", 4, 4, false);
- waitForBindings(3, "queues.testaddress", 4, 4, false);
- waitForBindings(4, "queues.testaddress", 4, 4, false);
-
- send(0, "queues.testaddress", 10, false, null);
-
- verifyReceiveRoundRobinInSomeOrder(10, 0, 1, 2, 3, 4);
-
- this.verifyNotReceive(0, 1, 2, 3, 4);
-
-
- closeAllConsumers();
-
- closeAllSessionFactories();
- }
- catch (Throwable e)
- {
- System.out.println(threadDump("SymmetricClusterWithBackupTest::testStopAllStartAll"));
- throw e;
- }
- }
-
- @Override
- public void testMixtureLoadBalancedAndNonLoadBalancedQueuesAddQueuesAndConsumersBeforeAllServersAreStarted() throws Exception
- {
- setupCluster();
-
- startServers(5, 0);
-
- setupSessionFactory(0, isNetty());
-
- createQueue(0, "queues.testaddress", "queue0", null, false);
- createQueue(0, "queues.testaddress", "queue5", null, false);
- createQueue(0, "queues.testaddress", "queue10", null, false);
- createQueue(0, "queues.testaddress", "queue15", null, false);
- createQueue(0, "queues.testaddress", "queue17", null, false);
-
- addConsumer(0, 0, "queue0", null);
- addConsumer(5, 0, "queue5", null);
-
- startServers(6, 1);
- setupSessionFactory(1, isNetty());
-
- createQueue(1, "queues.testaddress", "queue1", null, false);
- createQueue(1, "queues.testaddress", "queue6", null, false);
- createQueue(1, "queues.testaddress", "queue11", null, false);
- createQueue(1, "queues.testaddress", "queue15", null, false);
- createQueue(1, "queues.testaddress", "queue17", null, false);
-
- addConsumer(1, 1, "queue1", null);
- addConsumer(6, 1, "queue6", null);
- addConsumer(11, 1, "queue11", null);
- addConsumer(16, 1, "queue15", null);
-
- startServers(7, 2);
- setupSessionFactory(2, isNetty());
-
- createQueue(2, "queues.testaddress", "queue2", null, false);
- createQueue(2, "queues.testaddress", "queue7", null, false);
- createQueue(2, "queues.testaddress", "queue12", null, false);
- createQueue(2, "queues.testaddress", "queue15", null, false);
- createQueue(2, "queues.testaddress", "queue16", null, false);
-
- addConsumer(2, 2, "queue2", null);
- addConsumer(7, 2, "queue7", null);
- addConsumer(12, 2, "queue12", null);
- addConsumer(17, 2, "queue15", null);
-
- startServers(8, 3);
- setupSessionFactory(3, isNetty());
-
- createQueue(3, "queues.testaddress", "queue3", null, false);
- createQueue(3, "queues.testaddress", "queue8", null, false);
- createQueue(3, "queues.testaddress", "queue13", null, false);
- createQueue(3, "queues.testaddress", "queue15", null, false);
- createQueue(3, "queues.testaddress", "queue16", null, false);
- createQueue(3, "queues.testaddress", "queue18", null, false);
-
- addConsumer(3, 3, "queue3", null);
- addConsumer(8, 3, "queue8", null);
- addConsumer(13, 3, "queue13", null);
- addConsumer(18, 3, "queue15", null);
-
- startServers(9, 4);
- setupSessionFactory(4, isNetty());
-
- createQueue(4, "queues.testaddress", "queue4", null, false);
- createQueue(4, "queues.testaddress", "queue9", null, false);
- createQueue(4, "queues.testaddress", "queue14", null, false);
- createQueue(4, "queues.testaddress", "queue15", null, false);
- createQueue(4, "queues.testaddress", "queue16", null, false);
- createQueue(4, "queues.testaddress", "queue17", null, false);
- createQueue(4, "queues.testaddress", "queue18", null, false);
-
- addConsumer(4, 4, "queue4", null);
- addConsumer(9, 4, "queue9", null);
- addConsumer(10, 0, "queue10", null);
- addConsumer(14, 4, "queue14", null);
-
- addConsumer(15, 0, "queue15", null);
- addConsumer(19, 4, "queue15", null);
-
- addConsumer(20, 2, "queue16", null);
- addConsumer(21, 3, "queue16", null);
- addConsumer(22, 4, "queue16", null);
-
- addConsumer(23, 0, "queue17", null);
- addConsumer(24, 1, "queue17", null);
- addConsumer(25, 4, "queue17", null);
-
- addConsumer(26, 3, "queue18", null);
- addConsumer(27, 4, "queue18", null);
-
- waitForBindings(0, "queues.testaddress", 5, 5, true);
- waitForBindings(1, "queues.testaddress", 5, 5, true);
- waitForBindings(2, "queues.testaddress", 5, 5, true);
- waitForBindings(3, "queues.testaddress", 6, 6, true);
- waitForBindings(4, "queues.testaddress", 7, 7, true);
-
- waitForBindings(0, "queues.testaddress", 23, 23, false);
- waitForBindings(1, "queues.testaddress", 23, 23, false);
- waitForBindings(2, "queues.testaddress", 23, 23, false);
- waitForBindings(3, "queues.testaddress", 22, 22, false);
- waitForBindings(4, "queues.testaddress", 21, 21, false);
-
- send(0, "queues.testaddress", 10, false, null);
-
- verifyReceiveAll(10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
-
- verifyReceiveRoundRobinInSomeOrder(10, 15, 16, 17, 18, 19);
-
- verifyReceiveRoundRobinInSomeOrder(10, 20, 21, 22);
-
- verifyReceiveRoundRobinInSomeOrder(10, 23, 24, 25);
-
- verifyReceiveRoundRobinInSomeOrder(10, 26, 27);
-
- closeAllConsumers();
-
- closeAllSessionFactories();
- }
-
- public void _test() throws Exception
- {
- for (int i = 0; i < 50; i++)
- {
- System.out.println("\n\n" + i + "\n\n");
- testStartStopWithTwoServers();
- tearDown();
- setUp();
- }
- }
-
- public void testStartStopWithTwoServers() throws Exception
- {
- setupCluster();
-
- startServers(5, 6, 0, 1);
-
- setupSessionFactory(0, isNetty());
- setupSessionFactory(1, isNetty());
-// setupSessionFactory(2, isNetty());
-// setupSessionFactory(3, isNetty());
-// setupSessionFactory(4, isNetty());
-
- createQueue(0, "queues.testaddress", "queue0", null, false);
- createQueue(1, "queues.testaddress", "queue1", null, false);
-// createQueue(2, "queues.testaddress", "queue2", null, false);
-// createQueue(3, "queues.testaddress", "queue3", null, false);
-// createQueue(4, "queues.testaddress", "queue4", null, false);
-
- createQueue(0, "queues.testaddress", "queue5", null, false);
- createQueue(1, "queues.testaddress", "queue6", null, false);
-// createQueue(2, "queues.testaddress", "queue7", null, false);
-// createQueue(3, "queues.testaddress", "queue8", null, false);
-// createQueue(4, "queues.testaddress", "queue9", null, false);
-
- createQueue(0, "queues.testaddress", "queue10", null, false);
- createQueue(1, "queues.testaddress", "queue11", null, false);
-// createQueue(2, "queues.testaddress", "queue12", null, false);
-// createQueue(3, "queues.testaddress", "queue13", null, false);
-// createQueue(4, "queues.testaddress", "queue14", null, false);
-
- createQueue(0, "queues.testaddress", "queue15", null, false);
- createQueue(1, "queues.testaddress", "queue15", null, false);
-// createQueue(2, "queues.testaddress", "queue15", null, false);
-// createQueue(3, "queues.testaddress", "queue15", null, false);
-// createQueue(4, "queues.testaddress", "queue15", null, false);
-
-// createQueue(2, "queues.testaddress", "queue16", null, false);
-// createQueue(3, "queues.testaddress", "queue16", null, false);
-// createQueue(4, "queues.testaddress", "queue16", null, false);
-
- createQueue(0, "queues.testaddress", "queue17", null, false);
- createQueue(1, "queues.testaddress", "queue17", null, false);
-// createQueue(4, "queues.testaddress", "queue17", null, false);
-
-// createQueue(3, "queues.testaddress", "queue18", null, false);
-// createQueue(4, "queues.testaddress", "queue18", null, false);
-
- addConsumer(0, 0, "queue0", null);
- addConsumer(1, 1, "queue1", null);
-// addConsumer(2, 2, "queue2", null);
-// addConsumer(3, 3, "queue3", null);
-// addConsumer(4, 4, "queue4", null);
-
- addConsumer(5, 0, "queue5", null);
- addConsumer(6, 1, "queue6", null);
-// addConsumer(7, 2, "queue7", null);
-// addConsumer(8, 3, "queue8", null);
-// addConsumer(9, 4, "queue9", null);
-
- addConsumer(10, 0, "queue10", null);
- addConsumer(11, 1, "queue11", null);
-// addConsumer(12, 2, "queue12", null);
-// addConsumer(13, 3, "queue13", null);
-// addConsumer(14, 4, "queue14", null);
-
- addConsumer(15, 0, "queue15", null);
- addConsumer(16, 1, "queue15", null);
-// addConsumer(17, 2, "queue15", null);
-// addConsumer(18, 3, "queue15", null);
-// addConsumer(19, 4, "queue15", null);
-
-// addConsumer(20, 2, "queue16", null);
-// addConsumer(21, 3, "queue16", null);
-// addConsumer(22, 4, "queue16", null);
-
- addConsumer(23, 0, "queue17", null);
- addConsumer(24, 1, "queue17", null);
-// addConsumer(25, 4, "queue17", null);
-
-// addConsumer(26, 3, "queue18", null);
-// addConsumer(27, 4, "queue18", null);
-
- waitForBindings(0, "queues.testaddress", 5, 5, true);
- waitForBindings(1, "queues.testaddress", 5, 5, true);
-// waitForBindings(2, "queues.testaddress", 5, 5, true);
-// waitForBindings(3, "queues.testaddress", 6, 6, true);
-// waitForBindings(4, "queues.testaddress", 7, 7, true);
-
- waitForBindings(0, "queues.testaddress", 5 , 5, false);
-// waitForBindings(0, "queues.testaddress", 23, 23, false);
- waitForBindings(1, "queues.testaddress", 5, 5, false);
-// waitForBindings(1, "queues.testaddress", 23, 23, false);
-// waitForBindings(2, "queues.testaddress", 23, 23, false);
-// waitForBindings(3, "queues.testaddress", 22, 22, false);
-// waitForBindings(4, "queues.testaddress", 21, 21, false);
-
- send(0, "queues.testaddress", 10, false, null);
-
-// verifyReceiveAll(10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
- verifyReceiveAll(10, 0, 1, 5, 6, 10, 11);
-
- verifyReceiveRoundRobinInSomeOrder(10, 15, 16);
-// verifyReceiveRoundRobinInSomeOrder(10, 15, 16, 17, 18, 19);
-
-// verifyReceiveRoundRobinInSomeOrder(10, 20, 21, 22);
-
-// verifyReceiveRoundRobinInSomeOrder(10, 23, 24, 25);
- verifyReceiveRoundRobinInSomeOrder(10, 23, 24);
-
-// verifyReceiveRoundRobinInSomeOrder(10, 26, 27);
-
- removeConsumer(0);
- removeConsumer(5);
- removeConsumer(10);
- removeConsumer(15);
- removeConsumer(23);
-// removeConsumer(3);
-// removeConsumer(8);
-// removeConsumer(13);
-// removeConsumer(18);
-// removeConsumer(21);
-// removeConsumer(26);
-
- closeSessionFactory(0);
-// closeSessionFactory(3);
-
- stopServers(0, 5);
-// stopServers(0, 3, 5, 8);
-
- startServers(5, 0);
-// startServers(5, 8, 0, 3);
-
- Thread.sleep(2000);
-
- setupSessionFactory(0, isNetty());
-// setupSessionFactory(3, isNetty());
-
- createQueue(0, "queues.testaddress", "queue0", null, false);
-// createQueue(3, "queues.testaddress", "queue3", null, false);
-
- createQueue(0, "queues.testaddress", "queue5", null, false);
- // createQueue(3, "queues.testaddress", "queue8", null, false);
-
- createQueue(0, "queues.testaddress", "queue10", null, false);
-// createQueue(3, "queues.testaddress", "queue13", null, false);
-
- createQueue(0, "queues.testaddress", "queue15", null, false);
-// createQueue(3, "queues.testaddress", "queue15", null, false);
-
-// createQueue(3, "queues.testaddress", "queue16", null, false);
-
- createQueue(0, "queues.testaddress", "queue17", null, false);
-
-// createQueue(3, "queues.testaddress", "queue18", null, false);
-
- addConsumer(0, 0, "queue0", null);
-// addConsumer(3, 3, "queue3", null);
-
- addConsumer(5, 0, "queue5", null);
-// addConsumer(8, 3, "queue8", null);
-
- addConsumer(10, 0, "queue10", null);
-// addConsumer(13, 3, "queue13", null);
-
- addConsumer(15, 0, "queue15", null);
-// addConsumer(18, 3, "queue15", null);
-
-// addConsumer(21, 3, "queue16", null);
-
- addConsumer(23, 0, "queue17", null);
-
-// addConsumer(26, 3, "queue18", null);
-
- waitForBindings(0, "queues.testaddress", 5, 5, true);
- waitForBindings(1, "queues.testaddress", 5, 5, true);
-// waitForBindings(2, "queues.testaddress", 5, 5, true);
-// waitForBindings(3, "queues.testaddress", 6, 6, true);
-// waitForBindings(4, "queues.testaddress", 7, 7, true);
-
- waitForBindings(0, "queues.testaddress", 5, 5, false);
- waitForBindings(1, "queues.testaddress", 5, 5, false);
-// waitForBindings(0, "queues.testaddress", 23, 23, false);
-// waitForBindings(1, "queues.testaddress", 23, 23, false);
-// waitForBindings(2, "queues.testaddress", 23, 23, false);
-// waitForBindings(3, "queues.testaddress", 22, 22, false);
-/// waitForBindings(4, "queues.testaddress", 21, 21, false);
-
- send(0, "queues.testaddress", 10, false, null);
-
- verifyReceiveAll(10, 0, 1, 5, 6, 10, 11);
-
- verifyReceiveRoundRobinInSomeOrder(10, 15, 16);
- verifyReceiveRoundRobinInSomeOrder(10, 23, 24);
-
- /*
- verifyReceiveAll(10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
-
- verifyReceiveRoundRobinInSomeOrder(10, 15, 16, 17, 18, 19);
-
- verifyReceiveRoundRobinInSomeOrder(10, 20, 21, 22);
-
- verifyReceiveRoundRobinInSomeOrder(10, 23, 24, 25);
-
- verifyReceiveRoundRobinInSomeOrder(10, 26, 27);
- */
- closeAllConsumers();
-
- closeAllSessionFactories();
- }
-
- @Override
- public void testStartStopServers() throws Exception
- {
- setupCluster();
-
- startServers();
-
- log.info("setup session factories: ");
-
- setupSessionFactory(0, isNetty());
- setupSessionFactory(1, isNetty());
- setupSessionFactory(2, isNetty());
- setupSessionFactory(3, isNetty());
- setupSessionFactory(4, isNetty());
-
- createQueue(0, "queues.testaddress", "queue0", null, false);
- createQueue(1, "queues.testaddress", "queue1", null, false);
- createQueue(2, "queues.testaddress", "queue2", null, false);
- createQueue(3, "queues.testaddress", "queue3", null, false);
- createQueue(4, "queues.testaddress", "queue4", null, false);
-
- createQueue(0, "queues.testaddress", "queue5", null, false);
- createQueue(1, "queues.testaddress", "queue6", null, false);
- createQueue(2, "queues.testaddress", "queue7", null, false);
- createQueue(3, "queues.testaddress", "queue8", null, false);
- createQueue(4, "queues.testaddress", "queue9", null, false);
-
- createQueue(0, "queues.testaddress", "queue10", null, false);
- createQueue(1, "queues.testaddress", "queue11", null, false);
- createQueue(2, "queues.testaddress", "queue12", null, false);
- createQueue(3, "queues.testaddress", "queue13", null, false);
- createQueue(4, "queues.testaddress", "queue14", null, false);
-
- createQueue(0, "queues.testaddress", "queue15", null, false);
- createQueue(1, "queues.testaddress", "queue15", null, false);
- createQueue(2, "queues.testaddress", "queue15", null, false);
- createQueue(3, "queues.testaddress", "queue15", null, false);
- createQueue(4, "queues.testaddress", "queue15", null, false);
-
- createQueue(2, "queues.testaddress", "queue16", null, false);
- createQueue(3, "queues.testaddress", "queue16", null, false);
- createQueue(4, "queues.testaddress", "queue16", null, false);
-
- createQueue(0, "queues.testaddress", "queue17", null, false);
- createQueue(1, "queues.testaddress", "queue17", null, false);
- createQueue(4, "queues.testaddress", "queue17", null, false);
-
- createQueue(3, "queues.testaddress", "queue18", null, false);
- createQueue(4, "queues.testaddress", "queue18", null, false);
-
- addConsumer(0, 0, "queue0", null);
- addConsumer(1, 1, "queue1", null);
- addConsumer(2, 2, "queue2", null);
- addConsumer(3, 3, "queue3", null);
- addConsumer(4, 4, "queue4", null);
-
- addConsumer(5, 0, "queue5", null);
- addConsumer(6, 1, "queue6", null);
- addConsumer(7, 2, "queue7", null);
- addConsumer(8, 3, "queue8", null);
- addConsumer(9, 4, "queue9", null);
-
- addConsumer(10, 0, "queue10", null);
- addConsumer(11, 1, "queue11", null);
- addConsumer(12, 2, "queue12", null);
- addConsumer(13, 3, "queue13", null);
- addConsumer(14, 4, "queue14", null);
-
- addConsumer(15, 0, "queue15", null);
- addConsumer(16, 1, "queue15", null);
- addConsumer(17, 2, "queue15", null);
- addConsumer(18, 3, "queue15", null);
- addConsumer(19, 4, "queue15", null);
-
- addConsumer(20, 2, "queue16", null);
- addConsumer(21, 3, "queue16", null);
- addConsumer(22, 4, "queue16", null);
-
- addConsumer(23, 0, "queue17", null);
- addConsumer(24, 1, "queue17", null);
- addConsumer(25, 4, "queue17", null);
-
- addConsumer(26, 3, "queue18", null);
- addConsumer(27, 4, "queue18", null);
-
- log.info("wait for bindings...");
-
- waitForBindings(0, "queues.testaddress", 5, 5, true);
- waitForBindings(1, "queues.testaddress", 5, 5, true);
- waitForBindings(2, "queues.testaddress", 5, 5, true);
- waitForBindings(3, "queues.testaddress", 6, 6, true);
- waitForBindings(4, "queues.testaddress", 7, 7, true);
-
- waitForBindings(0, "queues.testaddress", 23, 23, false);
- waitForBindings(1, "queues.testaddress", 23, 23, false);
- waitForBindings(2, "queues.testaddress", 23, 23, false);
- waitForBindings(3, "queues.testaddress", 22, 22, false);
- waitForBindings(4, "queues.testaddress", 21, 21, false);
-
- log.info("send and receive messages");
-
- send(0, "queues.testaddress", 10, false, null);
-
- verifyReceiveAll(10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
-
- verifyReceiveRoundRobinInSomeOrder(10, 15, 16, 17, 18, 19);
-
- verifyReceiveRoundRobinInSomeOrder(10, 20, 21, 22);
-
- verifyReceiveRoundRobinInSomeOrder(10, 23, 24, 25);
-
- verifyReceiveRoundRobinInSomeOrder(10, 26, 27);
-
- removeConsumer(0);
- removeConsumer(5);
- removeConsumer(10);
- removeConsumer(15);
- removeConsumer(23);
- removeConsumer(3);
- removeConsumer(8);
- removeConsumer(13);
- removeConsumer(18);
- removeConsumer(21);
- removeConsumer(26);
-
- closeSessionFactory(0);
- closeSessionFactory(3);
-
- log.info("stop servers");
-
- stopServers(0, 3, 5, 8);
-
- log.info("restart servers");
-
- startServers(5, 8, 0, 3);
-
- Thread.sleep(2000);
-
- setupSessionFactory(0, isNetty());
- setupSessionFactory(3, isNetty());
-
- createQueue(0, "queues.testaddress", "queue0", null, false);
- createQueue(3, "queues.testaddress", "queue3", null, false);
-
- createQueue(0, "queues.testaddress", "queue5", null, false);
- createQueue(3, "queues.testaddress", "queue8", null, false);
-
- createQueue(0, "queues.testaddress", "queue10", null, false);
- createQueue(3, "queues.testaddress", "queue13", null, false);
-
- createQueue(0, "queues.testaddress", "queue15", null, false);
- createQueue(3, "queues.testaddress", "queue15", null, false);
-
- createQueue(3, "queues.testaddress", "queue16", null, false);
-
- createQueue(0, "queues.testaddress", "queue17", null, false);
-
- createQueue(3, "queues.testaddress", "queue18", null, false);
-
- addConsumer(0, 0, "queue0", null);
- addConsumer(3, 3, "queue3", null);
-
- addConsumer(5, 0, "queue5", null);
- addConsumer(8, 3, "queue8", null);
-
- addConsumer(10, 0, "queue10", null);
- addConsumer(13, 3, "queue13", null);
-
- addConsumer(15, 0, "queue15", null);
- addConsumer(18, 3, "queue15", null);
-
- addConsumer(21, 3, "queue16", null);
-
- addConsumer(23, 0, "queue17", null);
-
- addConsumer(26, 3, "queue18", null);
-
- waitForBindings(0, "queues.testaddress", 5, 5, true);
- waitForBindings(1, "queues.testaddress", 5, 5, true);
- waitForBindings(2, "queues.testaddress", 5, 5, true);
- waitForBindings(3, "queues.testaddress", 6, 6, true);
- waitForBindings(4, "queues.testaddress", 7, 7, true);
-
- waitForBindings(0, "queues.testaddress", 23, 23, false);
- waitForBindings(1, "queues.testaddress", 23, 23, false);
- waitForBindings(2, "queues.testaddress", 23, 23, false);
- waitForBindings(3, "queues.testaddress", 22, 22, false);
- waitForBindings(4, "queues.testaddress", 21, 21, false);
-
- send(0, "queues.testaddress", 10, false, null);
-
- verifyReceiveAll(10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
-
- verifyReceiveRoundRobinInSomeOrder(10, 15, 16, 17, 18, 19);
-
- verifyReceiveRoundRobinInSomeOrder(10, 20, 21, 22);
-
- verifyReceiveRoundRobinInSomeOrder(10, 23, 24, 25);
-
- verifyReceiveRoundRobinInSomeOrder(10, 26, 27);
-
- closeAllConsumers();
-
- closeAllSessionFactories();
- }
-
- @Override
- protected void setupCluster(final boolean forwardWhenNoConsumers) throws Exception
- {
- // The lives
- setupClusterConnectionWithBackups("cluster0",
- "queues",
- forwardWhenNoConsumers,
- 1,
- isNetty(),
- 0,
- new int[] { 1, 2, 3, 4 },
- new int[] { 6, 7, 8, 9 });
-
- setupClusterConnectionWithBackups("cluster1",
- "queues",
- forwardWhenNoConsumers,
- 1,
- isNetty(),
- 1,
- new int[] { 0, 2, 3, 4 },
- new int[] { 5, 7, 8, 9 });
-
- setupClusterConnectionWithBackups("cluster2",
- "queues",
- forwardWhenNoConsumers,
- 1,
- isNetty(),
- 2,
- new int[] { 0, 1, 3, 4 },
- new int[] { 5, 6, 8, 9 });
-
- setupClusterConnectionWithBackups("cluster3",
- "queues",
- forwardWhenNoConsumers,
- 1,
- isNetty(),
- 3,
- new int[] { 0, 1, 2, 4 },
- new int[] { 5, 6, 7, 9 });
-
- setupClusterConnectionWithBackups("cluster4",
- "queues",
- forwardWhenNoConsumers,
- 1,
- isNetty(),
- 4,
- new int[] { 0, 1, 2, 3 },
- new int[] { 5, 6, 7, 8 });
-
- // The backups
-
- setupClusterConnectionWithBackups("cluster0",
- "queues",
- forwardWhenNoConsumers,
- 1,
- isNetty(),
- 5,
- new int[] { 1, 2, 3, 4 },
- new int[] { 6, 7, 8, 9 });
-
- setupClusterConnectionWithBackups("cluster1",
- "queues",
- forwardWhenNoConsumers,
- 1,
- isNetty(),
- 6,
- new int[] { 0, 2, 3, 4 },
- new int[] { 5, 7, 8, 9 });
-
- setupClusterConnectionWithBackups("cluster2",
- "queues",
- forwardWhenNoConsumers,
- 1,
- isNetty(),
- 7,
- new int[] { 0, 1, 3, 4 },
- new int[] { 5, 6, 8, 9 });
-
- setupClusterConnectionWithBackups("cluster3",
- "queues",
- forwardWhenNoConsumers,
- 1,
- isNetty(),
- 8,
- new int[] { 0, 1, 2, 4 },
- new int[] { 5, 6, 7, 9 });
-
- setupClusterConnectionWithBackups("cluster4",
- "queues",
- forwardWhenNoConsumers,
- 1,
- isNetty(),
- 9,
- new int[] { 0, 1, 2, 3 },
- new int[] { 5, 6, 7, 8 });
- }
-
- @Override
- protected void setupServers() throws Exception
- {
- // The backups
- setupServer(5, isFileStorage(), isNetty(), true);
- setupServer(6, isFileStorage(), isNetty(), true);
- setupServer(7, isFileStorage(), isNetty(), true);
- setupServer(8, isFileStorage(), isNetty(), true);
- setupServer(9, isFileStorage(), isNetty(), true);
-
- // The lives
- setupServer(0, isFileStorage(), isNetty(), 5);
- setupServer(1, isFileStorage(), isNetty(), 6);
- setupServer(2, isFileStorage(), isNetty(), 7);
- setupServer(3, isFileStorage(), isNetty(), 8);
- setupServer(4, isFileStorage(), isNetty(), 9);
- }
-
- @Override
- protected void startServers() throws Exception
- {
- // Need to set backup, since when restarting backup after it has failed over, backup will have been set to false
-
- getServer(5).getConfiguration().setBackup(true);
- getServer(6).getConfiguration().setBackup(true);
- getServer(7).getConfiguration().setBackup(true);
- getServer(8).getConfiguration().setBackup(true);
- getServer(9).getConfiguration().setBackup(true);
-
- startServers(5, 6, 7, 8, 9, 0, 1, 2, 3, 4);
- }
-
- @Override
- protected void stopServers() throws Exception
- {
- closeAllConsumers();
-
- closeAllSessionFactories();
-
- stopServers(0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
- }
-
-}
15 years
JBoss hornetq SVN: r8424 - trunk/src/main/org/hornetq/utils.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-11-27 04:01:32 -0500 (Fri, 27 Nov 2009)
New Revision: 8424
Modified:
trunk/src/main/org/hornetq/utils/Pair.java
Log:
added toString() method
Modified: trunk/src/main/org/hornetq/utils/Pair.java
===================================================================
--- trunk/src/main/org/hornetq/utils/Pair.java 2009-11-27 08:53:34 UTC (rev 8423)
+++ trunk/src/main/org/hornetq/utils/Pair.java 2009-11-27 09:01:32 UTC (rev 8424)
@@ -74,4 +74,10 @@
(pother.b == null ? b == null : pother.b.equals(b));
}
+
+ @Override
+ public String toString()
+ {
+ return "Pair[a=" + a + ", b=" + b + "]";
+ }
}
15 years
JBoss hornetq SVN: r8423 - trunk/tests/src/org/hornetq/tests/integration/cluster/distribution.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-11-27 03:53:34 -0500 (Fri, 27 Nov 2009)
New Revision: 8423
Removed:
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java
Log:
temporarily removed tests hanging on hudson
Deleted: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java 2009-11-26 18:09:04 UTC (rev 8422)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettySymmetricClusterWithBackupTest.java 2009-11-27 08:53:34 UTC (rev 8423)
@@ -1,44 +0,0 @@
-/*
- * 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.distribution;
-
-/**
- * A NettySymmetricClusterWithBackupTest
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- *
- */
-public class NettySymmetricClusterWithBackupTest extends SymmetricClusterWithBackupTest
-{
- protected boolean isNetty()
- {
- return true;
- }
-
- protected boolean isFileStorage()
- {
- return false;
- }
-}
15 years
JBoss hornetq SVN: r8422 - trunk/tests/src/org/hornetq/tests/integration/cluster/distribution.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2009-11-26 13:09:04 -0500 (Thu, 26 Nov 2009)
New Revision: 8422
Removed:
trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java
Log:
temporarily removed tests hanging on hudson
Deleted: trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java 2009-11-26 17:39:30 UTC (rev 8421)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java 2009-11-26 18:09:04 UTC (rev 8422)
@@ -1,45 +0,0 @@
-/*
- * 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.distribution;
-
-/**
- * A NettyFileStorageSymmetricClusterWithBackupTest
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- *
- */
-public class NettyFileStorageSymmetricClusterWithBackupTest extends SymmetricClusterWithBackupTest
-{
- protected boolean isNetty()
- {
- return true;
- }
-
- protected boolean isFileStorage()
- {
- return true;
- }
-
-}
15 years