From 4b3a680d3e95943dc6ab6e464cc59768a1224b18 Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Thu, 28 Nov 2013 10:12:59 +0000 Subject: NO-JIRA: [Java System Tests] Increase timeout factor used for failover timeout. Test was failing on a slow (virtualised) Jenkins environment. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1546331 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/systests/junitvmwatcher3451231054183359611.properties | 1 + .../apache/qpid/client/failover/MultipleBrokersFailoverTest.java | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 qpid/java/systests/junitvmwatcher3451231054183359611.properties (limited to 'qpid/java') diff --git a/qpid/java/systests/junitvmwatcher3451231054183359611.properties b/qpid/java/systests/junitvmwatcher3451231054183359611.properties new file mode 100644 index 0000000000..da309e1083 --- /dev/null +++ b/qpid/java/systests/junitvmwatcher3451231054183359611.properties @@ -0,0 +1 @@ +testHeartbeatsEnabledUsingOlderLegacySystemProperty diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/MultipleBrokersFailoverTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/MultipleBrokersFailoverTest.java index a0fd093bfe..afc630296d 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/MultipleBrokersFailoverTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/MultipleBrokersFailoverTest.java @@ -20,6 +20,7 @@ */ package org.apache.qpid.client.failover; +import java.io.File; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -49,6 +50,8 @@ public class MultipleBrokersFailoverTest extends QpidBrokerTestCase implements C private static final String BROKER_PORTION_FORMAT = "tcp://localhost:%d?connectdelay='%d',retries='%d'"; private static final int FAILOVER_RETRIES = 1; private static final int FAILOVER_CONNECTDELAY = 1000; + private static final int FAILOVER_FACTOR = 4; + private int[] _brokerPorts; private AMQConnectionURL _connectionURL; private Connection _connection; @@ -149,7 +152,7 @@ public class MultipleBrokersFailoverTest extends QpidBrokerTestCase implements C if (_brokerPorts[i] > 0) { stopBrokerSafely(_brokerPorts[i]); - FileUtils.deleteDirectory(System.getProperty("QPID_WORK") + "/" + getFailingPort()); + FileUtils.deleteDirectory(System.getProperty("QPID_WORK") + File.separator + getFailingPort()); } } @@ -166,7 +169,7 @@ public class MultipleBrokersFailoverTest extends QpidBrokerTestCase implements C killBroker(_brokerPorts[1]); - awaitForFailoverCompletion(FAILOVER_CONNECTDELAY * _brokerPorts.length * 2); + awaitForFailoverCompletion(FAILOVER_CONNECTDELAY * _brokerPorts.length * FAILOVER_FACTOR); assertEquals("Failover is not started as expected", 0, _failoverStarted.getCount()); assertSendReceive(2); @@ -182,7 +185,7 @@ public class MultipleBrokersFailoverTest extends QpidBrokerTestCase implements C stopBroker(_brokerPorts[1]); - awaitForFailoverCompletion(FAILOVER_CONNECTDELAY * _brokerPorts.length * 2); + awaitForFailoverCompletion(FAILOVER_CONNECTDELAY * _brokerPorts.length * FAILOVER_FACTOR); assertEquals("Failover is not started as expected", 0, _failoverStarted.getCount()); assertSendReceive(1); -- cgit v1.2.1