[jboss-remoting-commits] JBoss Remoting SVN: r3650 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/registry.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Fri Mar 14 23:04:24 EDT 2008
Author: ron.sigal at jboss.com
Date: 2008-03-14 23:04:24 -0400 (Fri, 14 Mar 2008)
New Revision: 3650
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/registry/NetworkRegistryTestCase.java
Log:
JBREM-930: Uses value of System property "jrunit.bind_addr" instead of "localhost".
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/registry/NetworkRegistryTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/registry/NetworkRegistryTestCase.java 2008-03-15 02:59:58 UTC (rev 3649)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/registry/NetworkRegistryTestCase.java 2008-03-15 03:04:24 UTC (rev 3650)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.remoting.detection.registry;
+import java.net.InetAddress;
+
import junit.framework.TestCase;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.detection.ServerInvokerMetadata;
@@ -65,7 +67,9 @@
MulticastDetector detector1 = new MulticastDetector();
int port = TestUtil.getRandomPort();
- InvokerLocator locator1 = new InvokerLocator("socket://localhost:" + port);
+ String host = InetAddress.getLocalHost().getHostAddress();
+ String bindAddr = System.getProperty("jrunit.bind_addr", host);
+ InvokerLocator locator1 = new InvokerLocator("socket://" + bindAddr + ":" + port);
Connector connector1 = new Connector(locator1);
ObjectName obj = new ObjectName("jboss.remoting:type=Connector,transport=" + locator1.getProtocol());
server1.registerMBean(connector1, obj);
@@ -90,7 +94,7 @@
MulticastDetector detector2 = new MulticastDetector();
port = TestUtil.getRandomPort();
- InvokerLocator locator2 = new InvokerLocator("socket://localhost:" + port);
+ InvokerLocator locator2 = new InvokerLocator("socket://" + bindAddr + ":" + port);
Connector connector2 = new Connector(locator2);
ObjectName obj2 = new ObjectName("jboss.remoting:type=Connector,transport=" + locator2.getProtocol());
server2.registerMBean(connector2, obj2);
More information about the jboss-remoting-commits
mailing list