mirror of https://github.com/apache/activemq.git
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:
parent
46e8e17295
commit
0a676e5ffb
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue