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 2018/04/17 14:59:41 UTC

[1/2] activemq-artemis git commit: NO-JIRA: Fix test regression

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 59162653a -> 90b9a9809


NO-JIRA: Fix test regression

QuorumFailOverTest.testQuorumVotingLiveNotDead fails
because the quorum vote takes longer time to finish than
the test expects to.
(The test used to pass until commit ARTEMIS-1763)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/f29eeee1
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/f29eeee1
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/f29eeee1

Branch: refs/heads/master
Commit: f29eeee16754a1e89f5fbc371b040a90550cb677
Parents: 5916265
Author: Howard Gao <ho...@gmail.com>
Authored: Mon Apr 16 22:02:32 2018 +0800
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Apr 17 10:59:05 2018 -0400

----------------------------------------------------------------------
 .../apache/activemq/artemis/tests/util/ActiveMQTestBase.java | 8 ++++++--
 .../integration/cluster/failover/QuorumFailOverTest.java     | 5 +++++
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f29eeee1/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
index cc6d6b6..acc55f9 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
@@ -1314,7 +1314,7 @@ public abstract class ActiveMQTestBase extends Assert {
     * @param backup
     */
    public static final void waitForRemoteBackupSynchronization(final ActiveMQServer backup) {
-      waitForRemoteBackup(null, 10, true, backup);
+      waitForRemoteBackup(null, 20, true, backup);
    }
 
    /**
@@ -1332,6 +1332,10 @@ public abstract class ActiveMQTestBase extends Assert {
       final long toWait = seconds * 1000;
       final long time = System.currentTimeMillis();
       int loop = 0;
+      //Note: if maxLoop is too small there won't be
+      //enough time for quorum vote to complete and
+      //will cause test to fail.
+      final int maxLoop = 40;
       while (true) {
          Activation activation = actualServer.getActivation();
          boolean isReplicated = !backup.getHAPolicy().isSharedStore();
@@ -1343,7 +1347,7 @@ public abstract class ActiveMQTestBase extends Assert {
                //we may have already failed over and changed the Activation
                if (actualServer.isStarted()) {
                   //let it fail a few time to have time to start stopping in the case of waiting to failback
-                  isRemoteUpToDate = loop++ > 10;
+                  isRemoteUpToDate = loop++ > maxLoop;
                } else {
                   //we could be waiting to failback or restart if the server is stopping
                   isRemoteUpToDate = false;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/f29eeee1/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverTest.java
index ece21a3..fdf282a 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/QuorumFailOverTest.java
@@ -43,6 +43,11 @@ public class QuorumFailOverTest extends StaticClusterWithBackupFailoverTest {
       ((ReplicaPolicyConfiguration) servers[3].getConfiguration().getHAPolicyConfiguration()).setGroupName("group0");
       ((ReplicaPolicyConfiguration) servers[4].getConfiguration().getHAPolicyConfiguration()).setGroupName("group1");
       ((ReplicaPolicyConfiguration) servers[5].getConfiguration().getHAPolicyConfiguration()).setGroupName("group2");
+
+      //reduce the numbers so that the vote finishes faster
+      ((ReplicaPolicyConfiguration) servers[3].getConfiguration().getHAPolicyConfiguration()).setVoteRetries(5);
+      ((ReplicaPolicyConfiguration) servers[3].getConfiguration().getHAPolicyConfiguration()).setVoteRetryWait(500);
+
    }
 
    @Test


[2/2] activemq-artemis git commit: This closes #2021

Posted by cl...@apache.org.
This closes #2021


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/90b9a980
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/90b9a980
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/90b9a980

Branch: refs/heads/master
Commit: 90b9a9809a2cdefa07770e55f4e281a0c8eb476f
Parents: 5916265 f29eeee
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Apr 17 10:59:06 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Apr 17 10:59:06 2018 -0400

----------------------------------------------------------------------
 .../apache/activemq/artemis/tests/util/ActiveMQTestBase.java | 8 ++++++--
 .../integration/cluster/failover/QuorumFailOverTest.java     | 5 +++++
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------