You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2019/08/27 15:29:07 UTC

[activemq-artemis] branch master updated: NO-JIRA Fixing intermittent failure on QuorumFailOverLiveVotesTest

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/master by this push:
     new 5d9395d  NO-JIRA Fixing intermittent failure on QuorumFailOverLiveVotesTest
5d9395d is described below

commit 5d9395ddb9e87e3199a58db5bdfbdf4287587dad
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Tue Aug 27 11:28:01 2019 -0400

    NO-JIRA Fixing intermittent failure on QuorumFailOverLiveVotesTest
---
 .../integration/cluster/failover/QuorumFailOverLiveVotesTest.java  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverLiveVotesTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverLiveVotesTest.java
index dedf57a..67e0464 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverLiveVotesTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverLiveVotesTest.java
@@ -53,7 +53,6 @@ public class QuorumFailOverLiveVotesTest extends StaticClusterWithBackupFailover
 
    }
 
-
    @Test
    public void testQuorumVotingLiveNotDead() throws Exception {
       int[] liveServerIDs = new int[]{0, 1, 2};
@@ -70,6 +69,10 @@ public class QuorumFailOverLiveVotesTest extends StaticClusterWithBackupFailover
       waitForFailoverTopology(4, 0, 1, 2);
       waitForFailoverTopology(5, 0, 1, 2);
 
+      Wait.assertTrue(servers[0]::isReplicaSync);
+      Wait.assertTrue(servers[1]::isReplicaSync);
+      Wait.assertTrue(servers[2]::isReplicaSync);
+
       for (int i : liveServerIDs) {
          setupSessionFactory(i, i + 3, isNetty(), false);
          createQueue(i, QUEUES_TESTADDRESS, QUEUE_NAME, null, true);
@@ -91,7 +94,6 @@ public class QuorumFailOverLiveVotesTest extends StaticClusterWithBackupFailover
       assertFalse("no shared storage", servers[3].getHAPolicy().isSharedStore());
 
       SharedNothingLiveActivation liveActivation = (SharedNothingLiveActivation) servers[0].getActivation();
-     // ;
       servers[0].getRemotingService().freeze(null, null);
       waitForFailoverTopology(4, 3, 1, 2);
       waitForFailoverTopology(5, 3, 1, 2);
@@ -99,6 +101,7 @@ public class QuorumFailOverLiveVotesTest extends StaticClusterWithBackupFailover
       assertTrue(servers[3].waitForActivation(2, TimeUnit.SECONDS));
       Wait.assertTrue(servers[3]::isStarted);
       Wait.assertTrue(servers[3]::isActive);
+      Wait.assertTrue(servers[0]::isReplicaSync);
       liveActivation.freezeReplication();
       Wait.assertFalse(servers[0]::isStarted);
       Wait.assertFalse(servers[0]::isActive);