Author: borges
Date: 2011-11-02 12:17:48 -0400 (Wed, 02 Nov 2011)
New Revision: 11636
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java
Log:
Delete dead-code which -if used- would trigger NPE.
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java 2011-11-02
16:17:34 UTC (rev 11635)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteSingleLiveMultipleBackupsFailoverTest.java 2011-11-02
16:17:48 UTC (rev 11636)
@@ -24,7 +24,6 @@
import org.hornetq.core.client.impl.ClientSessionFactoryInternal;
import org.hornetq.core.config.ClusterConnectionConfiguration;
import org.hornetq.core.config.Configuration;
-import org.hornetq.core.config.impl.ConfigurationImpl;
import org.hornetq.core.server.JournalType;
import org.hornetq.tests.integration.cluster.util.RemoteProcessHornetQServer;
import org.hornetq.tests.integration.cluster.util.RemoteServerConfiguration;
@@ -137,13 +136,14 @@
}
+ @Override
protected boolean isNetty()
{
return true;
}
@Override
- protected void createLiveConfig(int liveNode, int... otherLiveNodes)
+ protected void createLiveConfig(int liveNode)
{
servers.put(liveNode, new
RemoteProcessHornetQServer(SharedLiveServerConfiguration.class.getName()));
}
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java 2011-11-02
16:17:34 UTC (rev 11635)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java 2011-11-02
16:17:48 UTC (rev 11636)
@@ -39,7 +39,7 @@
protected Map<Integer, TestableServer> servers = new HashMap<Integer,
TestableServer>();
private NodeManager nodeManager;
-
+
Logger log = Logger.getLogger(SingleLiveMultipleBackupsFailoverTest.class);
public void _testLoop() throws Exception
@@ -61,7 +61,7 @@
createBackupConfig(0, 3, 0, 1, 2, 4, 5);
createBackupConfig(0, 4, 0, 1, 2, 3, 5);
createBackupConfig(0, 5, 0, 1, 2, 3, 4);
-
+
servers.get(0).start();
waitForServer(servers.get(0).getServer());
servers.get(1).start();
@@ -72,9 +72,9 @@
servers.get(5).start();
ServerLocatorImpl locator = (ServerLocatorImpl)getServerLocator(0);
-
+
Topology topology = locator.getTopology();
-
+
// for logging and debugging
topology.setOwner("testMultipleFailovers");
@@ -88,7 +88,7 @@
log.info("failing node 0");
servers.get(0).crash(session);
-
+
session.close();
backupNode = waitForNewLive(5, true, servers, 1, 2, 3, 4, 5);
session = sendAndConsume(sf, false);
@@ -121,7 +121,7 @@
locator.close();
}
-
+
protected void createBackupConfig(int liveNode, int nodeid, int... nodes)
{
Configuration config1 = super.createDefaultConfig();
@@ -157,7 +157,7 @@
servers.put(nodeid, new SameProcessHornetQServer(createInVMFailoverServer(true,
config1, nodeManager, nodeid)));
}
- protected void createLiveConfig(int liveNode, int... otherLiveNodes)
+ protected void createLiveConfig(int liveNode)
{
TransportConfiguration liveConnector =
createTransportConfiguration(isNetty(), false, generateParams(liveNode,
isNetty()));
@@ -168,18 +168,9 @@
config0.setSecurityEnabled(false);
config0.setSharedStore(true);
config0.setClustered(true);
- List<String> pairs = null;
- for (int node : otherLiveNodes)
- {
- TransportConfiguration otherLiveConnector =
- createTransportConfiguration(isNetty(), false, generateParams(node,
isNetty()));
- config0.getConnectorConfigurations().put(otherLiveConnector.getName(),
otherLiveConnector);
- pairs.add(otherLiveConnector.getName());
-
- }
ClusterConnectionConfiguration ccc0 =
new ClusterConnectionConfiguration("cluster1", "jms",
liveConnector.getName(), -1, false, false, 1, 1,
- pairs, false);
+ null, false);
config0.getClusterConfigurations().add(ccc0);
config0.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);