[hornetq-commits] JBoss hornetq SVN: r12266 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Mar 8 11:06:11 EST 2012


Author: borges
Date: 2012-03-08 11:06:09 -0500 (Thu, 08 Mar 2012)
New Revision: 12266

Modified:
   trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
   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/ReplicatedLargeMessageWithDelayFailoverTest.java
Log:
HORNETQ-720 Fix hang on test delaying 'in-sync' message for Backup.

Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java	2012-03-08 16:05:48 UTC (rev 12265)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTest.java	2012-03-08 16:06:09 UTC (rev 12266)
@@ -543,8 +543,8 @@
       }
       System.out.println("received.size() = " + received.size());
       session.close();
-
-      Assert.assertTrue(retry <= 5);
+      final int retryLimit = 5;
+      Assert.assertTrue("Number of retries (" + retry + ")should be <= " + retryLimit, retry <= retryLimit);
    }
 
    private void createClientSessionFactory() throws Exception

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	2012-03-08 16:05:48 UTC (rev 12265)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java	2012-03-08 16:06:09 UTC (rev 12266)
@@ -110,13 +110,13 @@
       super.setUp();
       clearData();
       createConfigs();
-      
-      
-      
+
+
+
       liveServer.setIdentity(this.getClass().getSimpleName() + "/liveServer");
 
       liveServer.start();
-      
+
       waitForServer(liveServer.getServer());
 
       if (backupServer != null)
@@ -376,7 +376,7 @@
 	   }
 
 
-	   protected void crash(final ClientSession... sessions) throws Exception
+   protected void crash(final ClientSession... sessions) throws Exception
    {
       liveServer.crash(sessions);
    }

Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedLargeMessageWithDelayFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedLargeMessageWithDelayFailoverTest.java	2012-03-08 16:05:48 UTC (rev 12265)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedLargeMessageWithDelayFailoverTest.java	2012-03-08 16:06:09 UTC (rev 12266)
@@ -26,6 +26,14 @@
    }
 
    @Override
+   protected void crash(boolean waitFailure, ClientSession... sessions) throws Exception
+   {
+      syncDelay.deliverUpToDateMsg();
+      waitForBackup(null, 5);
+      super.crash(waitFailure, sessions);
+   }
+
+   @Override
    protected void tearDown() throws Exception
    {
       syncDelay.deliverUpToDateMsg();



More information about the hornetq-commits mailing list