Author: borges
Date: 2011-11-04 05:12:46 -0400 (Fri, 04 Nov 2011)
New Revision: 11657
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
Log:
Server identity is being set at setUp()
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
===================================================================
---
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2011-11-04
09:12:29 UTC (rev 11656)
+++
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2011-11-04
09:12:46 UTC (rev 11657)
@@ -112,8 +112,6 @@
clearData();
createConfigs();
-
-
liveServer.setIdentity(this.getClass().getSimpleName() + "/liveServer");
liveServer.start();
@@ -193,7 +191,6 @@
ReplicatedBackupUtils.createClusterConnectionConf(backupConfig,
backupConnector.getName(),
liveConnector.getName());
backupServer = createBackupServer();
- backupServer.getServer().setIdentity("bkpIdentityServer");
liveConfig = super.createDefaultConfig();
liveConfig.getAcceptorConfigurations().clear();
@@ -226,14 +223,11 @@
backupConfig.setSecurityEnabled(false);
backupServer = createBackupServer();
- backupServer.getServer().setIdentity("idBackup");
-
liveConfig.getAcceptorConfigurations().clear();
liveConfig.getAcceptorConfigurations().add(getAcceptorTransportConfiguration(true));
liveServer = createLiveServer();
- liveServer.getServer().setIdentity("idLive");
}
@Override
@@ -320,16 +314,16 @@
{
fail("backup server never started (" + backupServer.isStarted() +
"), or never finished synchronizing (" +
actualServer.isRemoteBackupUpToDate() + ")");
- }
+ }
try
{
Thread.sleep(100);
}
catch (InterruptedException e)
{
- //ignore
+ fail(e.getMessage());
}
- }
+ }
}
protected TransportConfiguration getNettyAcceptorTransportConfiguration(final boolean
live)
@@ -338,15 +332,13 @@
{
return new TransportConfiguration(NETTY_ACCEPTOR_FACTORY);
}
- else
- {
- Map<String, Object> server1Params = new HashMap<String, Object>();
-
server1Params.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME,
- org.hornetq.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT +
1);
+ Map<String, Object> server1Params = new HashMap<String, Object>();
- return new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, server1Params);
- }
+
server1Params.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME,
+
org.hornetq.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT + 1);
+
+ return new TransportConfiguration(NETTY_ACCEPTOR_FACTORY, server1Params);
}
protected TransportConfiguration getNettyConnectorTransportConfiguration(final boolean
live)
@@ -355,15 +347,12 @@
{
return new TransportConfiguration(NETTY_CONNECTOR_FACTORY);
}
- else
- {
- Map<String, Object> server1Params = new HashMap<String, Object>();
-
server1Params.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME,
- org.hornetq.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT +
1);
+ Map<String, Object> server1Params = new HashMap<String, Object>();
- return new TransportConfiguration(NETTY_CONNECTOR_FACTORY, server1Params);
- }
+
server1Params.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME,
+
org.hornetq.core.remoting.impl.netty.TransportConstants.DEFAULT_PORT + 1);
+ return new TransportConfiguration(NETTY_CONNECTOR_FACTORY, server1Params);
}
protected abstract TransportConfiguration getAcceptorTransportConfiguration(boolean
live);