You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2018/02/06 10:45:04 UTC

[1/2] qpid-broker-j git commit: NO-JIRA: [Java System Tests] [HA] Reduce the number of connections used by MultiNodeTest.testInFlightTransactionsWhilstMajorityIsLost when running on Apache CI

Repository: qpid-broker-j
Updated Branches:
  refs/heads/6.1.x dd9f95686 -> 2b8097e4e


NO-JIRA: [Java System Tests] [HA] Reduce the number of connections used by MultiNodeTest.testInFlightTransactionsWhilstMajorityIsLost when running on Apache CI

Cherry picked from master be1bb850529eb93b837b50cb42a21460a694e257


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/107dcad8
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/107dcad8
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/107dcad8

Branch: refs/heads/6.1.x
Commit: 107dcad8afa06046f2ce9e9643a7622c0e2fcd0d
Parents: dd9f956
Author: Keith Wall <kw...@apache.org>
Authored: Thu Dec 29 10:19:17 2016 +0000
Committer: Keith Wall <kw...@apache.org>
Committed: Tue Feb 6 10:44:39 2018 +0000

----------------------------------------------------------------------
 .../qpid/server/store/berkeleydb/replication/MultiNodeTest.java  | 4 ++--
 test-profiles/apache-ci.test.overridden.properties               | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/107dcad8/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
----------------------------------------------------------------------
diff --git a/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java b/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
index 27bfdbb..8d26966 100644
--- a/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
+++ b/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
@@ -459,7 +459,7 @@ public class MultiNodeTest extends QpidBrokerTestCase
 
     public void testInFlightTransactionsWhilstMajorityIsLost() throws Exception
     {
-        int connectionNumber = 20;
+        int connectionNumber = Integer.getInteger("MultiNodeTest.testInFlightTransactionsWhilstMajorityIsLost.numberOfConnections", 20);
         ExecutorService executorService = Executors.newFixedThreadPool(connectionNumber + NUMBER_OF_NODES -1);
         try
         {
@@ -619,7 +619,7 @@ public class MultiNodeTest extends QpidBrokerTestCase
                 }
                 else
                 {
-                    LOGGER.info("Failover did not occur");
+                    LOGGER.info("Failover never started");
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/107dcad8/test-profiles/apache-ci.test.overridden.properties
----------------------------------------------------------------------
diff --git a/test-profiles/apache-ci.test.overridden.properties b/test-profiles/apache-ci.test.overridden.properties
index d77b50b..cb839e7 100644
--- a/test-profiles/apache-ci.test.overridden.properties
+++ b/test-profiles/apache-ci.test.overridden.properties
@@ -38,6 +38,7 @@ port.http.threadPool.minimum=4
 BDBHAVirtualHostNodeTestHelper.numberOfSleepsOnChangeWaiting=100
 BDBHAVirtualHostNodeTestHelper.sleepIntervalOnChangeWaiting=100
 BDBHAVirtualHostNodeTestHelper.waitForVirtualhostInterval=30000
+MultiNodeTest.testInFlightTransactionsWhilstMajorityIsLost.numberOfConnections=3
 
 qpid.test_receive_short_timeout=1000
 qpid.test_receive_timeout=2000


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[2/2] qpid-broker-j git commit: NO-JIRA: [Broker-J] Change test MultiNodeTest#testPriority to make sure that both replicas have the test data fully replicated before shutting down the master

Posted by kw...@apache.org.
NO-JIRA: [Broker-J] Change test MultiNodeTest#testPriority to make sure that both replicas have the test data fully replicated before shutting down the master

Cherry picked from e5be145b5199554a705a3ab16a28c4f0473e8bdd


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/2b8097e4
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/2b8097e4
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/2b8097e4

Branch: refs/heads/6.1.x
Commit: 2b8097e4effd5b147cf27df311bd55435b2efc83
Parents: 107dcad
Author: Alex Rudyy <or...@apache.org>
Authored: Mon Nov 6 11:53:59 2017 +0000
Committer: Keith Wall <kw...@apache.org>
Committed: Tue Feb 6 10:44:49 2018 +0000

----------------------------------------------------------------------
 .../berkeleydb/replication/MultiNodeTest.java   | 33 +++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/2b8097e4/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
----------------------------------------------------------------------
diff --git a/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java b/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
index 8d26966..a24101d 100644
--- a/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
+++ b/bdbstore/systests/src/test/java/org/apache/qpid/server/store/berkeleydb/replication/MultiNodeTest.java
@@ -56,6 +56,7 @@ import org.apache.qpid.jms.ConnectionListener;
 import org.apache.qpid.jms.ConnectionURL;
 import org.apache.qpid.server.model.Broker;
 import org.apache.qpid.server.model.State;
+import org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHARemoteReplicationNode;
 import org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNode;
 import org.apache.qpid.server.virtualhostnode.berkeleydb.NodeRole;
 import org.apache.qpid.test.utils.QpidBrokerTestCase;
@@ -680,7 +681,7 @@ public class MultiNodeTest extends QpidBrokerTestCase
         Set<Integer> ports = _groupCreator.getBrokerPortNumbersForNodes();
         for (Integer port : ports)
         {
-            if (activeBrokerPort != port.intValue())
+            if (activeBrokerPort != port)
             {
                 priority = priority + 1;
                 highestPriorityBrokerPort = port;
@@ -692,6 +693,36 @@ public class MultiNodeTest extends QpidBrokerTestCase
 
         LOGGER.info("Broker on port " + highestPriorityBrokerPort + " has the highest priority of " + priority);
 
+        // make sure all remote nodes are materialized on the master
+        // in order to make sure that DBPing is not invoked
+        for (Integer port : ports)
+        {
+            if (activeBrokerPort != port)
+            {
+                _groupCreator.awaitNodeToAttainAttributeValue(activeBrokerPort, port, BDBHARemoteReplicationNode.ROLE, "REPLICA");
+            }
+        }
+
+        // do work on master
+        assertProducingConsuming(connection);
+
+        Map<String, Object> masterNodeAttributes = _groupCreator.getNodeAttributes(activeBrokerPort);
+
+        Object lastTransactionId = masterNodeAttributes.get(BDBHAVirtualHostNode.LAST_KNOWN_REPLICATION_TRANSACTION_ID);
+        assertTrue("Unexpected last transaction id: " + lastTransactionId, lastTransactionId instanceof Number);
+
+        // make sure all remote nodes have the same transaction id as master
+        for (Integer port : ports)
+        {
+            if (activeBrokerPort != port)
+            {
+                _groupCreator.awaitNodeToAttainAttributeValue(activeBrokerPort,
+                                                              port,
+                                                              BDBHARemoteReplicationNode.LAST_KNOWN_REPLICATION_TRANSACTION_ID,
+                                                              String.valueOf(lastTransactionId));
+            }
+        }
+
         LOGGER.info("Shutting down the MASTER");
         _groupCreator.stopNode(activeBrokerPort);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org