AMQ-1489 - reflect the new respect of host and port elements of multicast uri and use of group as query parameter in the tests that specify a group to ensure some test isolation; resolve unit test failures

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@693051 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2008-09-08 10:52:06 +00:00
parent b006b2533b
commit 4a7e0b35bd
13 changed files with 34 additions and 34 deletions

View File

@ -92,8 +92,8 @@ public class PeerTransportFactory extends TransportFactory {
IntrospectionSupport.setProperties(service, brokerOptions);
service.setBrokerName(finalBroker);
TransportConnector c = service.addConnector("tcp://localhost:0");
c.setDiscoveryUri(new URI("multicast://" + finalGroup));
service.addNetworkConnector("multicast://" + finalGroup);
c.setDiscoveryUri(new URI("multicast://default?group=" + finalGroup));
service.addNetworkConnector("multicast://default?group=" + finalGroup);
return service;
}
});

View File

@ -129,8 +129,8 @@ public class JmsMultipleBrokersTestSupport extends CombinationTestSupport {
}
TransportConnector transport = (TransportConnector)transportConnectors.get(0);
transport.setDiscoveryUri(new URI("multicast://" + groupName));
broker.addNetworkConnector("multicast://" + groupName);
transport.setDiscoveryUri(new URI("multicast://default?group=" + groupName));
broker.addNetworkConnector("multicast://default?group=" + groupName);
}
// Multicasting may take longer to setup

View File

@ -54,7 +54,7 @@ public class BrokerServiceTest extends TestCase {
BrokerService service = new BrokerService();
service.setPersistent(false);
service.setUseJmx(true);
NetworkConnector connector = service.addNetworkConnector("multicast://group-"+System.currentTimeMillis());
NetworkConnector connector = service.addNetworkConnector("multicast://default?group=group-"+System.currentTimeMillis());
service.start();
service.removeNetworkConnector(connector);
@ -66,7 +66,7 @@ public class BrokerServiceTest extends TestCase {
BrokerService service = new BrokerService();
service.setPersistent(false);
service.setUseJmx(false);
NetworkConnector connector = service.addNetworkConnector("multicast://group-"+System.currentTimeMillis());
NetworkConnector connector = service.addNetworkConnector("multicast://default?group=group-"+System.currentTimeMillis());
service.start();
service.removeNetworkConnector(connector);

View File

@ -203,11 +203,11 @@ public class NetworkLoadTest extends TestCase {
TransportConnector transportConnector = new TransportConnector();
transportConnector.setUri(new URI("tcp://localhost:"+(60000+brokerId)));
transportConnector.setDiscoveryUri(new URI("multicast://"+groupId));
transportConnector.setDiscoveryUri(new URI("multicast://default?group="+groupId));
broker.addConnector(transportConnector);
DiscoveryNetworkConnector networkConnector = new DiscoveryNetworkConnector();
networkConnector.setUri(new URI("multicast://"+groupId));
networkConnector.setUri(new URI("multicast://default?group="+groupId));
networkConnector.setBridgeTempDestinations(true);
networkConnector.setPrefetchSize(1);
broker.addNetworkConnector(networkConnector);

View File

@ -112,8 +112,8 @@ public class TopicClusterTest extends TestCase implements MessageListener {
String url = "tcp://localhost:0";
TransportConnector connector = container.addConnector(url);
connector.setDiscoveryUri(new URI("multicast://"+groupId));
container.addNetworkConnector("multicast://"+groupId);
connector.setDiscoveryUri(new URI("multicast://default?group="+groupId));
container.addNetworkConnector("multicast://default?group="+groupId);
container.start();
services.add(container);

View File

@ -134,7 +134,7 @@ public class DiscoveryTransportBrokerTest extends NetworkTestSupport {
if ( groupName == null ) {
groupName = "group-"+System.currentTimeMillis();
}
return "multicast://"+groupName;
return "multicast://default?group="+groupName;
}
protected TransportConnector createRemoteConnector() throws Exception, IOException, URISyntaxException {

View File

@ -140,43 +140,43 @@ public class TwoBrokerMulticastQueueTest extends CombinationTestSupport {
}
public void testSendReceiveUsingDiscovery() throws Exception {
sendUri = "discovery:multicast://"+groupId;
recvUri = "discovery:multicast://"+groupId;
sendUri = "discovery:multicast://default?group="+groupId;
recvUri = "discovery:multicast://default?group="+groupId;
createMulticastBrokerNetwork();
doSendReceiveTest();
}
public void testMultipleConsumersConnectUsingDiscovery() throws Exception {
sendUri = "discovery:multicast://"+groupId;
recvUri = "discovery:multicast://"+groupId;
sendUri = "discovery:multicast://default?group="+groupId;
recvUri = "discovery:multicast://default?group="+groupId;
createMulticastBrokerNetwork();
doMultipleConsumersConnectTest();
}
public void testSendReceiveUsingAutoAssignFailover() throws Exception {
sendUri = "failover:(discovery:multicast://"+groupId+")";
recvUri = "failover:(discovery:multicast://"+groupId+")";
sendUri = "failover:(discovery:multicast:default?group=//"+groupId+")";
recvUri = "failover:(discovery:multicast:default?group=//"+groupId+")";
createAutoAssignMulticastBrokerNetwork();
doSendReceiveTest();
}
public void testMultipleConsumersConnectUsingAutoAssignFailover() throws Exception {
sendUri = "failover:(discovery:multicast://"+groupId+")";
recvUri = "failover:(discovery:multicast://"+groupId+")";
sendUri = "failover:(discovery:multicast:default?group=//"+groupId+")";
recvUri = "failover:(discovery:multicast:default?group=//"+groupId+")";
createAutoAssignMulticastBrokerNetwork();
doMultipleConsumersConnectTest();
}
public void testSendReceiveUsingAutoAssignDiscovery() throws Exception {
sendUri = "discovery:multicast://"+groupId;
recvUri = "discovery:multicast://"+groupId;
sendUri = "discovery:multicast://default?group="+groupId;
recvUri = "discovery:multicast://default?group="+groupId;
createAutoAssignMulticastBrokerNetwork();
doSendReceiveTest();
}
public void testMultipleConsumersConnectUsingAutoAssignDiscovery() throws Exception {
sendUri = "discovery:multicast://"+groupId;
recvUri = "discovery:multicast://"+groupId;
sendUri = "discovery:multicast://default?group="+groupId;
recvUri = "discovery:multicast://default?group="+groupId;
createAutoAssignMulticastBrokerNetwork();
doMultipleConsumersConnectTest();
}

View File

@ -25,7 +25,7 @@
<property name="annotatedClass"><value>org.apache.activemq.transport.stomp.SamplePojo</value></property>
</bean>
<broker useJmx="false" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true">
<broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core" populateJMSXUserID="true">
<transportConnectors>
<transportConnector name="stomp" uri="stomp://localhost:61613"/>

View File

@ -21,11 +21,11 @@
<broker brokerName="BrokerA" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
<transportConnectors>
<transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://${groupId}"/>
<transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default?group=${groupId}"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://${groupId}"/>
<networkConnector uri="multicast://default?group=${groupId}"/>
</networkConnectors>
<persistenceAdapter>

View File

@ -21,11 +21,11 @@
<broker brokerName="BrokerB" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
<transportConnectors>
<transportConnector uri="tcp://localhost:61617" discoveryUri="multicast://${groupId}"/>
<transportConnector uri="tcp://localhost:61617" discoveryUri="multicast://default?group=${groupId}"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://${groupId}"/>
<networkConnector uri="multicast://default?group=${groupId}"/>
</networkConnectors>
<persistenceAdapter>

View File

@ -21,11 +21,11 @@
<broker brokerName="BrokerB" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
<transportConnectors>
<transportConnector uri="tcp://localhost:0" discoveryUri="multicast://${groupId}"/>
<transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default?group=${groupId}"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://${groupId}"/>
<networkConnector uri="multicast://default?group=${groupId}"/>
</networkConnectors>
<persistenceAdapter>

View File

@ -21,11 +21,11 @@
<broker brokerName="receiver" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
<transportConnectors>
<transportConnector uri="tcp://localhost:0" discoveryUri="multicast://${groupId}"/>
<transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default?group=${groupId}"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://${groupId}"/>
<networkConnector uri="multicast://default?group=${groupId}"/>
</networkConnectors>
<persistenceAdapter>

View File

@ -21,11 +21,11 @@
<broker brokerName="sender" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
<transportConnectors>
<transportConnector uri="tcp://localhost:0" discoveryUri="multicast://${groupId}"/>
<transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default?group=${groupId}"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://${groupId}"/>
<networkConnector uri="multicast://default?group=${groupId}"/>
</networkConnectors>
<persistenceAdapter>