summaryrefslogtreecommitdiff
path: root/java/systests
diff options
context:
space:
mode:
authorAidan Skinner <aidan@apache.org>2008-02-20 17:12:32 +0000
committerAidan Skinner <aidan@apache.org>2008-02-20 17:12:32 +0000
commit3aed99f65d795c234faa9b584182cf3ea8c67b4a (patch)
tree8ef844f3a6ad1810a8e37a13c87ca23ddf51b603 /java/systests
parentbc9cf0d495598b359fc1a67d03f4636ca610c6a9 (diff)
downloadqpid-python-3aed99f65d795c234faa9b584182cf3ea8c67b4a.tar.gz
QPID-786 Remove bogus Failover timeout, add test.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@629540 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java b/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
index fffe073362..9d1e461f05 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
@@ -7,6 +7,7 @@ import org.apache.qpid.client.AMQQueue;
import org.apache.qpid.client.transport.TransportConnection;
import org.apache.qpid.jms.ConnectionListener;
import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.url.URLSyntaxException;
import org.apache.log4j.Logger;
import javax.jms.Connection;
@@ -49,7 +50,6 @@ public class FailoverTest extends TestCase implements ConnectionListener
TransportConnection.createVMBroker(usedBrokers);
}
- //undo last addition
conFactory = new AMQConnectionFactory(String.format(BROKER, usedBrokers - 1, usedBrokers));
_logger.info("Connecting on:" + conFactory.getConnectionURL());
@@ -197,6 +197,20 @@ public class FailoverTest extends TestCase implements ConnectionListener
assertNotNull("Exception should be thrown", failure);
}
+ // This test disabled so that it doesn't add 4 minnutes to the length of time it takes to run, which would be lame
+ public void txest4MinuteFailover() throws Exception
+ {
+ conFactory = new AMQConnectionFactory("amqp://guest:guest@/test?brokerlist='vm://:"+(usedBrokers-1)+"?connectdelay='60000'&retries='2''");
+ _logger.info("Connecting on:" + conFactory.getConnectionURL());
+ con = conFactory.createConnection();
+ ((AMQConnection) con).setConnectionListener(this);
+ con.start();
+
+ long failTime = System.currentTimeMillis() + 60000;
+ causeFailure();
+ assertTrue("Failover did not take long enough", System.currentTimeMillis() > failTime);
+ }
+
public void bytesSent(long count)
{
}