diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/endpoint-tribes/src/test/java/org')
2 files changed, 13 insertions, 10 deletions
diff --git a/sca-java-2.x/trunk/modules/endpoint-tribes/src/test/java/org/apache/tuscany/sca/endpoint/tribes/MultiRegTestCase.java b/sca-java-2.x/trunk/modules/endpoint-tribes/src/test/java/org/apache/tuscany/sca/endpoint/tribes/MultiRegTestCase.java index aa445f3ce7..9c9b041aa2 100644 --- a/sca-java-2.x/trunk/modules/endpoint-tribes/src/test/java/org/apache/tuscany/sca/endpoint/tribes/MultiRegTestCase.java +++ b/sca-java-2.x/trunk/modules/endpoint-tribes/src/test/java/org/apache/tuscany/sca/endpoint/tribes/MultiRegTestCase.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.endpoint.tribes; -import java.net.InetAddress; import java.util.HashMap; import java.util.Map; @@ -55,8 +54,8 @@ public class MultiRegTestCase implements EndpointListener { public void testReplication() throws Exception { RuntimeEndpoint ep1 = createEndpoint("ep1uri"); - String host = InetAddress.getLocalHost().getHostAddress(); - String bind = null; // "9.65.158.31"; + // String host = InetAddress.getLocalHost().getHostAddress(); + String bind = "127.0.0.1"; // "9.65.158.31"; String port1 = "8085"; String port2 = "8086"; String port3 = "8087"; @@ -74,7 +73,7 @@ public class MultiRegTestCase implements EndpointListener { Map<String, String> attrs2 = new HashMap<String, String>(); // attrs2.put("nomcast", "true"); - attrs1.put("bind", bind); + attrs2.put("bind", bind); attrs2.put("receiverPort", port2); attrs2.put("receiverAutoBind", range); // attrs2.put("routes", host + ":"+port1); @@ -84,7 +83,7 @@ public class MultiRegTestCase implements EndpointListener { Map<String, String> attrs3 = new HashMap<String, String>(); // attrs3.put("nomcast", "true"); - attrs1.put("bind", bind); + attrs3.put("bind", bind); attrs3.put("receiverPort", port3); attrs3.put("receiverAutoBind", range); // attrs3.put("routes", host + ":"+port1); diff --git a/sca-java-2.x/trunk/modules/endpoint-tribes/src/test/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedEndpointRegistryTestCase.java b/sca-java-2.x/trunk/modules/endpoint-tribes/src/test/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedEndpointRegistryTestCase.java index 35d00fbba8..173d2126ff 100644 --- a/sca-java-2.x/trunk/modules/endpoint-tribes/src/test/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedEndpointRegistryTestCase.java +++ b/sca-java-2.x/trunk/modules/endpoint-tribes/src/test/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedEndpointRegistryTestCase.java @@ -19,25 +19,29 @@ package org.apache.tuscany.sca.endpoint.tribes; +import java.util.HashMap; +import java.util.Map; + import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; public class ReplicatedEndpointRegistryTestCase { @Test - @Ignore("Ignore this test case for now as it might be sensitive to the multicast settings for a multi-homed machine") + // @Ignore("Ignore this test case for now as it might be sensitive to the multicast settings for a multi-homed machine") public void testReplicate() throws InterruptedException { DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); FactoryExtensionPoint factories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class); AssemblyFactory assemblyFactory = factories.getFactory(AssemblyFactory.class); - ReplicatedEndpointRegistry ep1 = new ReplicatedEndpointRegistry(extensionPoints, null, "foo", "bar"); + Map<String, String> attrs = new HashMap<String, String>(); + attrs.put("bind", "127.0.0.1"); + ReplicatedEndpointRegistry ep1 = new ReplicatedEndpointRegistry(extensionPoints, attrs, "foo", "bar"); System.out.println("ep1 is: " + ep1); ep1.start(); @@ -50,7 +54,7 @@ public class ReplicatedEndpointRegistryTestCase { System.out.println("EP1 in Registry 1: " + e1p); Assert.assertNotNull(e1p); - ReplicatedEndpointRegistry ep2 = new ReplicatedEndpointRegistry(extensionPoints, null, "foo", "bar"); + ReplicatedEndpointRegistry ep2 = new ReplicatedEndpointRegistry(extensionPoints, attrs, "foo", "bar"); System.out.println("ep2 is: " + ep2); ep2.start(); Thread.sleep(5000); @@ -59,7 +63,7 @@ public class ReplicatedEndpointRegistryTestCase { System.out.println("EP1 in Registry 2: " + e1p2); Assert.assertNotNull(e1p2); - ReplicatedEndpointRegistry ep3 = new ReplicatedEndpointRegistry(extensionPoints, null, "foo", "bar"); + ReplicatedEndpointRegistry ep3 = new ReplicatedEndpointRegistry(extensionPoints, attrs, "foo", "bar"); System.out.println("ep3 is: " + ep3); ep3.start(); Thread.sleep(5000); |