Add a shorter connectTimeout to ensure the tests don't fail because they are waiting on the reconnectMutex for to long.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1370865 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-08-08 18:01:11 +00:00
parent 46e8e17295
commit 0a676e5ffb
1 changed files with 45 additions and 47 deletions

View File

@ -16,6 +16,13 @@
*/
package org.apache.activemq.transport.failover;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.IOException;
import java.net.URI;
import org.apache.activemq.command.ConnectionId;
import org.apache.activemq.command.ConnectionInfo;
import org.apache.activemq.command.MessageAck;
@ -30,20 +37,13 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
import java.net.URI;
import static org.junit.Assert.*;
public class FailoverTransportTest {
protected Transport transport;
protected FailoverTransport failoverTransport;
private int commandsReceived;
@Before
public void setUp() throws Exception {
commandsReceived = 0;
}
@After
@ -62,7 +62,6 @@ public class FailoverTransportTest {
transport.setTransportListener(new TransportListener() {
public void onCommand(Object command) {
commandsReceived++;
}
public void onException(IOException error) {
@ -128,11 +127,10 @@ public class FailoverTransportTest {
protected Transport createTransport() throws Exception {
Transport transport = TransportFactory.connect(
new URI("failover://(tcp://localhost:1234)"));
new URI("failover://(tcp://localhost:1234?transport.connectTimeout=10000)"));
transport.setTransportListener(new TransportListener() {
public void onCommand(Object command) {
commandsReceived++;
}
public void onException(IOException error) {