Author: borges
Date: 2011-08-11 13:08:09 -0400 (Thu, 11 Aug 2011)
New Revision: 11187
Added:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedLargeMessageWithDelayFailoverTest.java
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/BackupSyncDelay.java
Log:
HORNETQ-720 Add test for Replication Sync of LargeMessages
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
===================================================================
---
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java 2011-08-11
16:56:03 UTC (rev 11186)
+++
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java 2011-08-11
17:08:09 UTC (rev 11187)
@@ -135,7 +135,7 @@
@Override
protected void crash(ClientSession... sessions) throws Exception
{
- if (backupServer != null)
+ if (backupServer != null && backupServer.isStarted())
{
// some tests crash the liveServer before the backupServer is sync'ed
waitForBackup(sf, 3);
Added:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedLargeMessageWithDelayFailoverTest.java
===================================================================
---
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedLargeMessageWithDelayFailoverTest.java
(rev 0)
+++
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedLargeMessageWithDelayFailoverTest.java 2011-08-11
17:08:09 UTC (rev 11187)
@@ -0,0 +1,26 @@
+package org.hornetq.tests.integration.cluster.failover;
+
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.tests.integration.cluster.util.BackupSyncDelay;
+
+public class ReplicatedLargeMessageWithDelayFailoverTest extends
ReplicatedLargeMessageFailoverTest
+{
+
+ private BackupSyncDelay syncDelay;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ startBackupServer = false;
+ super.setUp();
+ syncDelay = new BackupSyncDelay(backupServer, liveServer);
+ backupServer.start();
+ }
+
+ @Override
+ protected void crash(ClientSession... sessions) throws Exception
+ {
+ syncDelay.deliverUpToDateMsg();
+ super.crash(sessions);
+ }
+}
Modified:
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/BackupSyncDelay.java
===================================================================
---
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/BackupSyncDelay.java 2011-08-11
16:56:03 UTC (rev 11186)
+++
branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/util/BackupSyncDelay.java 2011-08-11
17:08:09 UTC (rev 11187)
@@ -41,7 +41,8 @@
public void deliverUpToDateMsg()
{
- handler.deliver();
+ if (backup.isStarted())
+ handler.deliver();
}
public BackupSyncDelay(TestableServer backup, TestableServer live)
Show replies by date