Author: ron.sigal(a)jboss.com
Date: 2008-08-09 21:32:01 -0400 (Sat, 09 Aug 2008)
New Revision: 4490
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/classloaders/InjectedClassloadersTestCase.java
Log:
JBREM-1000: Gets random port for loader port.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/classloaders/InjectedClassloadersTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/classloaders/InjectedClassloadersTestCase.java 2008-08-10
01:25:46 UTC (rev 4489)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/dynamic/remote/classloaders/InjectedClassloadersTestCase.java 2008-08-10
01:32:01 UTC (rev 4490)
@@ -238,8 +238,9 @@
{
host = InetAddress.getLocalHost().getHostAddress();
port = PortUtil.findFreePort(host);
+ String loaderPort = Integer.toString(PortUtil.findFreePort(host));
locatorURI = getTransport() + "://" + host + ":" + port;
- locatorURI += "/?" + InvokerLocator.LOADER_PORT + "=4444";
+ locatorURI += "/?" + InvokerLocator.LOADER_PORT + "=" +
loaderPort;
serverLocator = new InvokerLocator(locatorURI);
HashMap config = new HashMap();
config.put(InvokerLocator.FORCE_REMOTE, "true");
@@ -266,7 +267,7 @@
serverParameters.put(Remoting.REMOTE_CLASS_LOADERS, classLoaders);
serverConfiguration.setServerParameters(serverParameters);
Map invokerLocatorParameters = new HashMap();
- invokerLocatorParameters.put(InvokerLocator.LOADER_PORT, "4444");
+ invokerLocatorParameters.put(InvokerLocator.LOADER_PORT, loaderPort);
serverConfiguration.setInvokerLocatorParameters(invokerLocatorParameters);
connector = new Connector(config);
connector.setServerConfiguration(serverConfiguration);
Show replies by date