mirror of https://github.com/apache/activemq.git
prevent hang if os muiticast is disabled
This commit is contained in:
parent
981c0f20fa
commit
c9c1f587ad
|
@ -144,7 +144,7 @@ public class DiscoveryTransportBrokerTest extends NetworkTestSupport {
|
|||
}
|
||||
|
||||
protected StubConnection createFailoverConnection() throws Exception {
|
||||
URI failoverURI = new URI("discovery:" + getDiscoveryUri());
|
||||
URI failoverURI = new URI("discovery:(" + getDiscoveryUri() + ")?startupMaxReconnectAttempts=5");
|
||||
Transport transport = TransportFactory.connect(failoverURI);
|
||||
StubConnection connection = new StubConnection(transport);
|
||||
connections.add(connection);
|
||||
|
|
|
@ -64,7 +64,7 @@ public class DiscoveryTransportNoBrokerTest extends CombinationTestSupport {
|
|||
final int noConnectionToCreate = 10;
|
||||
for (int i=0; i<10;i++) {
|
||||
ActiveMQConnectionFactory factory =
|
||||
new ActiveMQConnectionFactory("discovery:(multicast://239.255.2.3:6155?group=" + group +")?closeAsync=false");
|
||||
new ActiveMQConnectionFactory("discovery:(multicast://239.255.2.3:6155?group=" + group +")?closeAsync=false&startupMaxReconnectAttempts=5");
|
||||
LOG.info("Connecting.");
|
||||
Connection connection = factory.createConnection();
|
||||
connection.setClientID("test");
|
||||
|
|
Loading…
Reference in New Issue