AMQ-3014 remove hardcoded port 50000

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1352487 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2012-06-21 10:11:22 +00:00
parent 7fbbcf3565
commit 044b11918a
1 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ import org.junit.Test;
*/ */
public class AMQ3014Test { public class AMQ3014Test {
// Change this URL to be an unused port. // Change this URL to be an unused port.
private static final String REMOTE_BROKER_URL = "tcp://localhost:50000"; private static final String BROKER_URL = "tcp://localhost:0";
private List<BrokerInfo> remoteBrokerInfos = Collections private List<BrokerInfo> remoteBrokerInfos = Collections
.synchronizedList(new ArrayList<BrokerInfo>()); .synchronizedList(new ArrayList<BrokerInfo>());
@ -111,7 +111,7 @@ public class AMQ3014Test {
remoteBroker.setBrokerName("remoteBroker"); remoteBroker.setBrokerName("remoteBroker");
remoteBroker.setPersistent(false); remoteBroker.setPersistent(false);
remoteBroker.setUseJmx(false); remoteBroker.setUseJmx(false);
remoteBroker.addConnector(REMOTE_BROKER_URL); remoteBroker.addConnector(BROKER_URL);
remoteBroker.setSchedulerSupport(false); remoteBroker.setSchedulerSupport(false);
} }
@ -150,7 +150,7 @@ public class AMQ3014Test {
// to the remote broker. // to the remote broker.
DiscoveryNetworkConnector dnc = new DiscoveryNetworkConnector(); DiscoveryNetworkConnector dnc = new DiscoveryNetworkConnector();
SimpleDiscoveryAgent da = new SimpleDiscoveryAgent(); SimpleDiscoveryAgent da = new SimpleDiscoveryAgent();
da.setServices(REMOTE_BROKER_URL); da.setServices(remoteBroker.getTransportConnectors().get(0).getPublishableConnectString());
dnc.setDiscoveryAgent(da); dnc.setDiscoveryAgent(da);
localBroker.addNetworkConnector(dnc); localBroker.addNetworkConnector(dnc);