[hornetq-commits] JBoss hornetq SVN: r11004 - in branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster: util and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Jul 19 07:54:31 EDT 2011
Author: borges
Date: 2011-07-19 07:54:31 -0400 (Tue, 19 Jul 2011)
New Revision: 11004
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackAutoTest.java
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedAsynchronousFailoverTest.java
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java
Log:
Fix NPE in replicatedAsync...FailoverTest
Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackAutoTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackAutoTest.java 2011-07-19 11:53:53 UTC (rev 11003)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackAutoTest.java 2011-07-19 11:54:31 UTC (rev 11004)
@@ -303,6 +303,7 @@
* @param message
* @throws Exception
*/
+ @Override
protected void setBody(final int i, final ClientMessage message) throws Exception
{
message.getBodyBuffer().writeString("message" + i);
Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java 2011-07-19 11:53:53 UTC (rev 11003)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java 2011-07-19 11:54:31 UTC (rev 11004)
@@ -42,7 +42,7 @@
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
-
+
public static class SharedLiveServerConfiguration extends RemoteServerConfiguration
{
@@ -110,7 +110,7 @@
}
return createTransportConfiguration(true, false, params);
}
-
+
@Override
protected TransportConfiguration getAcceptorTransportConfiguration(boolean live)
{
Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedAsynchronousFailoverTest.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedAsynchronousFailoverTest.java 2011-07-19 11:53:53 UTC (rev 11003)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedAsynchronousFailoverTest.java 2011-07-19 11:54:31 UTC (rev 11004)
@@ -13,7 +13,6 @@
package org.hornetq.tests.integration.cluster.failover;
-import org.hornetq.core.config.Configuration;
import org.hornetq.tests.integration.cluster.util.SameProcessHornetQServer;
import org.hornetq.tests.integration.cluster.util.TestableServer;
@@ -40,46 +39,22 @@
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
-
+
+ @Override
protected TestableServer createLiveServer()
{
return new SameProcessHornetQServer(createServer(true, liveConfig));
}
+ @Override
protected TestableServer createBackupServer()
{
return new SameProcessHornetQServer(createServer(true, backupConfig));
}
-
+
@Override
protected void createConfigs() throws Exception
{
- Configuration config1 = super.createDefaultConfig();
- config1.setBindingsDirectory(config1.getBindingsDirectory() + "_backup");
- config1.setJournalDirectory(config1.getJournalDirectory() + "_backup");
- config1.getAcceptorConfigurations().clear();
- config1.getAcceptorConfigurations().add(getAcceptorTransportConfiguration(false));
- config1.setSecurityEnabled(false);
- config1.setSharedStore(false);
- config1.setBackup(true);
- backupServer = createBackupServer();
-
- Configuration config0 = super.createDefaultConfig();
- config0.getAcceptorConfigurations().clear();
- config0.getAcceptorConfigurations().add(getAcceptorTransportConfiguration(true));
-
- /*liveConfig.getConnectorConfigurations().put("toBackup", getConnectorTransportConfiguration(false));
- liveConfig.setBackupConnectorName("toBackup");*/
- config0.setSecurityEnabled(false);
- config0.setSharedStore(false);
- liveServer = createLiveServer();
-
- backupServer.start();
- liveServer.start();
+ createReplicatedConfigs();
}
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
}
Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java
===================================================================
--- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java 2011-07-19 11:53:53 UTC (rev 11003)
+++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/SameProcessHornetQServer.java 2011-07-19 11:54:31 UTC (rev 11004)
@@ -98,6 +98,7 @@
ClusterManagerImpl clusterManager = (ClusterManagerImpl) server.getClusterManager();
clusterManager.clear();
+ Assert.assertTrue("server should be running!", server.isStarted());
server.stop(true);
More information about the hornetq-commits
mailing list