Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2008-02-07 12:19:44 -0500
committermkuppe2008-02-07 12:19:44 -0500
commit6703033d2d68b2414a6c7023ab21e2171e5c9bb1 (patch)
treee377fa49fa85be4c9ef02a8e83ac26aea2e0f29c /tests/bundles/org.eclipse.ecf.tests.provider.jslp
parentc778b9c952e002f2f72dfc345540fcbbdab5ae29 (diff)
downloadorg.eclipse.ecf-6703033d2d68b2414a6c7023ab21e2171e5c9bb1.tar.gz
org.eclipse.ecf-6703033d2d68b2414a6c7023ab21e2171e5c9bb1.tar.xz
org.eclipse.ecf-6703033d2d68b2414a6c7023ab21e2171e5c9bb1.zip
ASSIGNED - bug 218159: [Discovery][jSLP] Tests fail because localhost/127.0.0.1 != external hostname
https://bugs.eclipse.org/bugs/show_bug.cgi?id=218159
Diffstat (limited to 'tests/bundles/org.eclipse.ecf.tests.provider.jslp')
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryServiceTest.java2
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPServiceInfoTest.java24
2 files changed, 17 insertions, 9 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryServiceTest.java b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryServiceTest.java
index 15f8baa81..d93ef3f8f 100755
--- a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryServiceTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryServiceTest.java
@@ -16,6 +16,6 @@ import org.eclipse.ecf.tests.discovery.DiscoveryServiceTest;
public class JSLPDiscoveryServiceTest extends DiscoveryServiceTest {
public JSLPDiscoveryServiceTest() {
- super(JSLPDiscoveryContainer.NAME);
+ super(JSLPDiscoveryContainer.NAME, JSLPDiscoveryContainer.REDISCOVER);
}
}
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPServiceInfoTest.java b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPServiceInfoTest.java
index 1d57f27b8..b1c3c4c5d 100755
--- a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPServiceInfoTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPServiceInfoTest.java
@@ -10,32 +10,40 @@
******************************************************************************/
package org.eclipse.ecf.tests.provider.jslp;
-import java.net.URI;
-
import org.eclipse.ecf.core.identity.IDCreateException;
import org.eclipse.ecf.core.identity.IDFactory;
import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.discovery.IServiceInfo;
import org.eclipse.ecf.discovery.ServiceProperties;
import org.eclipse.ecf.discovery.identity.IServiceID;
import org.eclipse.ecf.provider.jslp.container.JSLPServiceInfo;
import org.eclipse.ecf.provider.jslp.identity.JSLPNamespace;
-import org.eclipse.ecf.tests.discovery.ITestConstants;
+import org.eclipse.ecf.tests.discovery.DiscoveryTestHelper;
import org.eclipse.ecf.tests.discovery.ServiceInfoTest;
public class JSLPServiceInfoTest extends ServiceInfoTest {
-
+
public JSLPServiceInfoTest() {
- uri = URI.create(ITestConstants.URI);
+ super();
+ uri = DiscoveryTestHelper.createDefaultURI();
priority = 456;
weight = 789;
serviceProperties = new ServiceProperties();
serviceProperties.setProperty("foobar", new String("foobar"));
- Namespace namespace = IDFactory.getDefault().getNamespaceByName(JSLPNamespace.NAME);
+ Namespace namespace = IDFactory.getDefault().getNamespaceByName(
+ JSLPNamespace.NAME);
try {
- serviceID = (IServiceID) IDFactory.getDefault().createID(namespace, ITestConstants.SERVICE_TYPE);
+ serviceID = (IServiceID) IDFactory.getDefault().createID(namespace,
+ new Object[] {DiscoveryTestHelper.SERVICE_TYPE, DiscoveryTestHelper.getHost()});
} catch (IDCreateException e) {
fail(e.getMessage());
}
- serviceInfo = new JSLPServiceInfo(uri, serviceID, priority, weight, serviceProperties);
+ serviceInfo = new JSLPServiceInfo(uri, serviceID, priority, weight,
+ serviceProperties);
+ }
+
+ protected IServiceInfo getServiceInfo(IServiceInfo aServiceInfo)
+ throws IDCreateException, SecurityException {
+ return new JSLPServiceInfo(aServiceInfo);
}
}

Back to the top