[1/2] activemq-artemis git commit: NO-JIRA: Adding timeouts on failover tests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[1/2] activemq-artemis git commit: NO-JIRA: Adding timeouts on failover tests

clebertsuconic-2
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 7374d2f72 -> 9385ce487


NO-JIRA: Adding timeouts on failover tests


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

Branch: refs/heads/master
Commit: 9385ce48723a7525cd7548c085b1bddb938c87e7
Parents: a40d25c
Author: Clebert Suconic <[hidden email]>
Authored: Mon Mar 20 17:45:24 2017 -0400
Committer: Clebert Suconic <[hidden email]>
Committed: Mon Mar 20 18:04:31 2017 -0400

----------------------------------------------------------------------
 .../cluster/failover/FailoverTest.java          | 88 ++++++++++----------
 .../cluster/failover/NettyFailoverTest.java     |  2 +-
 .../failover/ReplicatedFailoverTest.java        |  2 +-
 3 files changed, 46 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9385ce48/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
index f5cf764..1b79dad 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java
@@ -107,7 +107,7 @@ public class FailoverTest extends FailoverTestBase {
    }
 
    // https://issues.jboss.org/browse/HORNETQ-685
-   @Test
+   @Test(timeout = 120000)
    public void testTimeoutOnFailover() throws Exception {
       locator.setCallTimeout(1000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(-1);
 
@@ -172,7 +172,7 @@ public class FailoverTest extends FailoverTestBase {
    }
 
    // https://issues.jboss.org/browse/HORNETQ-685
-   @Test
+   @Test(timeout = 120000)
    public void testTimeoutOnFailoverConsume() throws Exception {
       locator.setCallTimeout(5000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setBlockOnAcknowledge(true).setReconnectAttempts(-1).setAckBatchSize(0);
 
@@ -233,7 +233,7 @@ public class FailoverTest extends FailoverTestBase {
       session.close();
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testTimeoutOnFailoverConsumeBlocked() throws Exception {
       locator.setCallTimeout(5000).setBlockOnNonDurableSend(true).setConsumerWindowSize(0).setBlockOnDurableSend(true).setAckBatchSize(0).setBlockOnAcknowledge(true).setReconnectAttempts(-1).setAckBatchSize(0);
 
@@ -326,7 +326,7 @@ public class FailoverTest extends FailoverTestBase {
    }
 
    // https://issues.jboss.org/browse/HORNETQ-685
-   @Test
+   @Test(timeout = 120000)
    public void testTimeoutOnFailoverTransactionCommit() throws Exception {
       locator.setCallTimeout(5000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(-1);
 
@@ -390,7 +390,7 @@ public class FailoverTest extends FailoverTestBase {
    }
 
    // https://issues.jboss.org/browse/HORNETQ-685
-   @Test
+   @Test(timeout = 120000)
    public void testTimeoutOnFailoverTransactionRollback() throws Exception {
       locator.setCallTimeout(2000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(-1);
 
@@ -443,7 +443,7 @@ public class FailoverTest extends FailoverTestBase {
     *
     * @throws Exception
     */
-   @Test
+   @Test(timeout = 120000)
    public void testNonTransactedWithZeroConsumerWindowSize() throws Exception {
       locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(-1);
 
@@ -490,7 +490,7 @@ public class FailoverTest extends FailoverTestBase {
       sf = (ClientSessionFactoryInternal) createSessionFactory(locator);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testNonTransacted() throws Exception {
       createSessionFactory();
 
@@ -524,7 +524,7 @@ public class FailoverTest extends FailoverTestBase {
     *
     * @throws Exception
     */
-   @Test
+   @Test(timeout = 120000)
    public void testFailBack() throws Exception {
       boolean doFailBack = true;
       HAPolicy haPolicy = backupServer.getServer().getHAPolicy();
@@ -537,7 +537,7 @@ public class FailoverTest extends FailoverTestBase {
       setUp();
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testFailBackLiveRestartsBackupIsGone() throws Exception {
       locator.setFailoverOnInitialConnection(true);
       createSessionFactory();
@@ -583,14 +583,14 @@ public class FailoverTest extends FailoverTestBase {
       session2.commit();
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testSimpleFailover() throws Exception {
       HAPolicy haPolicy = backupServer.getServer().getHAPolicy();
 
       simpleFailover(haPolicy instanceof ReplicaPolicy, false);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testWithoutUsingTheBackup() throws Exception {
       locator.setFailoverOnInitialConnection(true);
       createSessionFactory();
@@ -714,7 +714,7 @@ public class FailoverTest extends FailoverTestBase {
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testConsumeTransacted() throws Exception {
       createSessionFactory();
 
@@ -786,7 +786,7 @@ public class FailoverTest extends FailoverTestBase {
    }
 
    // https://jira.jboss.org/jira/browse/HORNETQ-285
-   @Test
+   @Test(timeout = 120000)
    public void testFailoverOnInitialConnection() throws Exception {
       locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setFailoverOnInitialConnection(true).setReconnectAttempts(-1);
 
@@ -812,7 +812,7 @@ public class FailoverTest extends FailoverTestBase {
       session.close();
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testTransactedMessagesSentSoRollback() throws Exception {
       createSessionFactory();
 
@@ -851,7 +851,7 @@ public class FailoverTest extends FailoverTestBase {
     * Test that once the transacted session has throw a TRANSACTION_ROLLED_BACK exception,
     * it can be reused again
     */
-   @Test
+   @Test(timeout = 120000)
    public void testTransactedMessagesSentSoRollbackAndContinueWork() throws Exception {
       createSessionFactory();
 
@@ -897,7 +897,7 @@ public class FailoverTest extends FailoverTestBase {
       session.close();
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testTransactedMessagesNotSentSoNoRollback() throws Exception {
       try {
          createSessionFactory();
@@ -941,7 +941,7 @@ public class FailoverTest extends FailoverTestBase {
       }
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testTransactedMessagesWithConsumerStartedBeforeFailover() throws Exception {
       createSessionFactory();
 
@@ -980,7 +980,7 @@ public class FailoverTest extends FailoverTestBase {
       session.commit();
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testTransactedMessagesConsumedSoRollback() throws Exception {
       createSessionFactory();
 
@@ -1015,7 +1015,7 @@ public class FailoverTest extends FailoverTestBase {
       }
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testTransactedMessagesNotConsumedSoNoRollback() throws Exception {
       createSessionFactory();
 
@@ -1061,7 +1061,7 @@ public class FailoverTest extends FailoverTestBase {
       Assert.assertNull(consumer.receiveImmediate());
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testXAMessagesSentSoRollbackOnEnd() throws Exception {
       createSessionFactory();
 
@@ -1096,7 +1096,7 @@ public class FailoverTest extends FailoverTestBase {
       Assert.assertNull(message);
    }
 
-   @Test
+   @Test(timeout = 120000)
    //start a tx but sending messages after crash
    public void testXAMessagesSentSoRollbackOnEnd2() throws Exception {
       createSessionFactory();
@@ -1134,7 +1134,7 @@ public class FailoverTest extends FailoverTestBase {
       Assert.assertNull(message);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testXAMessagesSentSoRollbackOnPrepare() throws Exception {
       createSessionFactory();
 
@@ -1176,7 +1176,7 @@ public class FailoverTest extends FailoverTestBase {
    }
 
    // This might happen if 1PC optimisation kicks in
-   @Test
+   @Test(timeout = 120000)
    public void testXAMessagesSentSoRollbackOnCommit() throws Exception {
       createSessionFactory();
 
@@ -1213,7 +1213,7 @@ public class FailoverTest extends FailoverTestBase {
       Assert.assertNull(message);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testXAMessagesNotSentSoNoRollbackOnCommit() throws Exception {
       createSessionFactory();
 
@@ -1254,7 +1254,7 @@ public class FailoverTest extends FailoverTestBase {
       session.commit(xid2, false);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testXAMessagesConsumedSoRollbackOnEnd() throws Exception {
       createSessionFactory();
 
@@ -1289,7 +1289,7 @@ public class FailoverTest extends FailoverTestBase {
       }
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testXAMessagesConsumedSoRollbackOnEnd2() throws Exception {
       createSessionFactory();
 
@@ -1329,7 +1329,7 @@ public class FailoverTest extends FailoverTestBase {
       receiveMessages(consumer);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testXAMessagesConsumedSoRollbackOnPrepare() throws Exception {
       createSessionFactory();
 
@@ -1367,7 +1367,7 @@ public class FailoverTest extends FailoverTestBase {
    }
 
    // 1PC optimisation
-   @Test
+   @Test(timeout = 120000)
    public void testXAMessagesConsumedSoRollbackOnCommit() throws Exception {
       createSessionFactory();
       ClientSession session1 = createSessionAndQueue();
@@ -1410,7 +1410,7 @@ public class FailoverTest extends FailoverTestBase {
       session2.close();
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testCreateNewFactoryAfterFailover() throws Exception {
       locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setFailoverOnInitialConnection(true);
       sf = createSessionFactoryAndWaitForTopology(locator, 2);
@@ -1436,7 +1436,7 @@ public class FailoverTest extends FailoverTestBase {
       session = sendAndConsume(sf, true);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testFailoverMultipleSessionsWithConsumers() throws Exception {
       createSessionFactory();
 
@@ -1489,7 +1489,7 @@ public class FailoverTest extends FailoverTestBase {
    /*
     * Browser will get reset to beginning after failover
     */
-   @Test
+   @Test(timeout = 120000)
    public void testFailWithBrowser() throws Exception {
       createSessionFactory();
       ClientSession session = createSession(sf, true, true);
@@ -1518,7 +1518,7 @@ public class FailoverTest extends FailoverTestBase {
       }
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testFailThenReceiveMoreMessagesAfterFailover() throws Exception {
       createSessionFactory();
 
@@ -1595,7 +1595,7 @@ public class FailoverTest extends FailoverTestBase {
       return i % 2 == 0;
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testFailThenReceiveMoreMessagesAfterFailover2() throws Exception {
       locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setBlockOnAcknowledge(true).setReconnectAttempts(-1);
 
@@ -1628,22 +1628,22 @@ public class FailoverTest extends FailoverTestBase {
       receiveMessages(consumer, 0, NUM_MESSAGES, true);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testSimpleSendAfterFailoverDurableTemporary() throws Exception {
       doSimpleSendAfterFailover(true, true);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testSimpleSendAfterFailoverNonDurableTemporary() throws Exception {
       doSimpleSendAfterFailover(false, true);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testSimpleSendAfterFailoverDurableNonTemporary() throws Exception {
       doSimpleSendAfterFailover(true, false);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testSimpleSendAfterFailoverNonDurableNonTemporary() throws Exception {
       doSimpleSendAfterFailover(false, false);
    }
@@ -1674,7 +1674,7 @@ public class FailoverTest extends FailoverTestBase {
       receiveMessages(consumer);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testForceBlockingReturn() throws Exception {
       locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setBlockOnAcknowledge(true).setReconnectAttempts(-1);
 
@@ -1726,7 +1726,7 @@ public class FailoverTest extends FailoverTestBase {
       session.close();
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testCommitOccurredUnblockedAndResendNoDuplicates() throws Exception {
       locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setReconnectAttempts(-1).setBlockOnAcknowledge(true);
 
@@ -1857,7 +1857,7 @@ public class FailoverTest extends FailoverTestBase {
       Assert.assertNull(message);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testCommitDidNotOccurUnblockedAndResend() throws Exception {
       locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setBlockOnAcknowledge(true).setReconnectAttempts(-1);
 
@@ -1942,7 +1942,7 @@ public class FailoverTest extends FailoverTestBase {
       Assert.assertNull("expecting null message", message);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testBackupServerNotRemoved() throws Exception {
       // HORNETQ-720 Disabling test for replicating backups.
       if (!(backupServer.getServer().getHAPolicy() instanceof SharedStoreSlavePolicy)) {
@@ -1976,7 +1976,7 @@ public class FailoverTest extends FailoverTestBase {
       producer.send(message);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testLiveAndBackupLiveComesBack() throws Exception {
       locator.setFailoverOnInitialConnection(true);
       createSessionFactory();
@@ -2008,7 +2008,7 @@ public class FailoverTest extends FailoverTestBase {
       producer.send(message);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testLiveAndBackupLiveComesBackNewFactory() throws Exception {
       locator.setFailoverOnInitialConnection(true);
       createSessionFactory();
@@ -2057,7 +2057,7 @@ public class FailoverTest extends FailoverTestBase {
       Assert.assertEquals("message0", cm.getBodyBuffer().readString());
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testLiveAndBackupBackupComesBackNewFactory() throws Exception {
       locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setFailoverOnInitialConnection(true).setReconnectAttempts(-1);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9385ce48/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/NettyFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/NettyFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/NettyFailoverTest.java
index f3801a1..dccbe45 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/NettyFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/NettyFailoverTest.java
@@ -42,7 +42,7 @@ public class NettyFailoverTest extends FailoverTest {
       return getNettyConnectorTransportConfiguration(live);
    }
 
-   @Test
+   @Test(timeout = 120000)
    public void testFailoverWithHostAlias() throws Exception {
       Map<String, Object> params = new HashMap<>();
       params.put(TransportConstants.HOST_PROP_NAME, "127.0.0.1");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9385ce48/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedFailoverTest.java
index e72bb0c..88ac5e0 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/ReplicatedFailoverTest.java
@@ -43,7 +43,7 @@ public class ReplicatedFailoverTest extends FailoverTest {
    protected void beforeWaitForRemoteBackupSynchronization() {
    }
 
-   @Test
+   @Test(timeout = 120000)
    /*
    * default maxSavedReplicatedJournalsSize is 2, this means the backup will fall back to replicated only twice, after this
    * it is stopped permanently

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[2/2] activemq-artemis git commit: ARTEMIS-1042 Fixing AMQPFailoverTest

clebertsuconic-2
ARTEMIS-1042 Fixing AMQPFailoverTest


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

Branch: refs/heads/master
Commit: a40d25c06a744fd6043eee64695ddedefe05da05
Parents: 7374d2f
Author: Clebert Suconic <[hidden email]>
Authored: Mon Mar 20 17:38:19 2017 -0400
Committer: Clebert Suconic <[hidden email]>
Committed: Mon Mar 20 18:04:31 2017 -0400

----------------------------------------------------------------------
 .../artemis/tests/integration/amqp/AmqpNettyFailoverTest.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a40d25c0/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpNettyFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpNettyFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpNettyFailoverTest.java
index f264269..5496883 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpNettyFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpNettyFailoverTest.java
@@ -19,6 +19,7 @@ package org.apache.activemq.artemis.tests.integration.amqp;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.tests.integration.cluster.failover.FailoverTest;
+import org.apache.activemq.artemis.tests.integration.cluster.failover.FailoverTestBase;
 import org.apache.qpid.jms.JmsConnectionFactory;
 import org.junit.Assert;
 import org.junit.Test;
@@ -36,7 +37,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 @RunWith(Parameterized.class)
-public class AmqpNettyFailoverTest extends FailoverTest {
+public class AmqpNettyFailoverTest extends FailoverTestBase {
 
 
    // this will ensure that all tests in this class are run twice,
@@ -66,7 +67,7 @@ public class AmqpNettyFailoverTest extends FailoverTest {
    }
 
 
-   @Test
+   @Test(timeout = 120000)
    public void testFailoverListWithAMQP() throws Exception {
       JmsConnectionFactory factory = getJmsConnectionFactory();
       try (Connection connection = factory.createConnection()) {

Loading...