mirror of https://github.com/apache/activemq.git
prevent test failing on slower machines
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@900363 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7ceb4cbc43
commit
2ac5e7aa3e
|
@ -91,6 +91,7 @@ public class DiscoveryNetworkReconnectTest {
|
|||
configure(brokerA);
|
||||
brokerA.addConnector("tcp://localhost:0");
|
||||
brokerA.start();
|
||||
brokerA.waitUntilStarted();
|
||||
|
||||
proxy = new SocketProxy(brokerA.getTransportConnectors().get(0).getConnectUri());
|
||||
managementContext = context.mock(ManagementContext.class);
|
||||
|
@ -146,7 +147,9 @@ public class DiscoveryNetworkReconnectTest {
|
|||
@After
|
||||
public void tearDown() throws Exception {
|
||||
brokerA.stop();
|
||||
brokerA.waitUntilStopped();
|
||||
brokerB.stop();
|
||||
brokerB.waitUntilStopped();
|
||||
proxy.close();
|
||||
}
|
||||
|
||||
|
@ -165,6 +168,7 @@ public class DiscoveryNetworkReconnectTest {
|
|||
|
||||
brokerB.addNetworkConnector(discoveryAddress + "&wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000");
|
||||
brokerB.start();
|
||||
brokerB.waitUntilStarted();
|
||||
doReconnect();
|
||||
}
|
||||
|
||||
|
@ -174,7 +178,8 @@ public class DiscoveryNetworkReconnectTest {
|
|||
public void testSimpleReconnect() throws Exception {
|
||||
brokerB.addNetworkConnector("simple://(" + proxy.getUrl()
|
||||
+ ")?useExponentialBackOff=false&initialReconnectDelay=500&wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000");
|
||||
brokerB.start();
|
||||
brokerB.start();
|
||||
brokerB.waitUntilStarted();
|
||||
doReconnect();
|
||||
}
|
||||
|
||||
|
@ -189,7 +194,7 @@ public class DiscoveryNetworkReconnectTest {
|
|||
}));
|
||||
|
||||
// wait for network connector
|
||||
assertTrue("network connector mbean registered within 1 minute", mbeanRegistered.tryAcquire(60, TimeUnit.SECONDS));
|
||||
assertTrue("network connector mbean registered within 2 minute", mbeanRegistered.tryAcquire(120, TimeUnit.SECONDS));
|
||||
|
||||
// force an inactivity timeout via the proxy
|
||||
proxy.pause();
|
||||
|
|
Loading…
Reference in New Issue