Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2008-05-20 07:47:03 -0400
committermkuppe2008-05-20 07:47:03 -0400
commite59bfa36b512f5be7559aa4517c055d19f5972c1 (patch)
tree41f76b0989e79d8e11bdfafba146ba3573431d60 /tests/bundles/org.eclipse.ecf.tests.provider.jslp
parent30933364e8bd6f0dd0e051cc96ae1ae1d205b154 (diff)
downloadorg.eclipse.ecf-e59bfa36b512f5be7559aa4517c055d19f5972c1.tar.gz
org.eclipse.ecf-e59bfa36b512f5be7559aa4517c055d19f5972c1.tar.xz
org.eclipse.ecf-e59bfa36b512f5be7559aa4517c055d19f5972c1.zip
NEW - bug 232813: [Discovery][jSLP] No OSGi service is registered
https://bugs.eclipse.org/bugs/show_bug.cgi?id=232813 NEW - bug 218308: [Discovery][jSLP] org.eclipse.ecf.discovery.IDiscoveryContainerAdapter.getServices() doesn't return all "reachable" services https://bugs.eclipse.org/bugs/show_bug.cgi?id=218308
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.java8
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryTest.java39
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPServiceInfoTest.java5
3 files changed, 15 insertions, 37 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 d93ef3f8f..0d4187659 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,12 @@ import org.eclipse.ecf.tests.discovery.DiscoveryServiceTest;
public class JSLPDiscoveryServiceTest extends DiscoveryServiceTest {
public JSLPDiscoveryServiceTest() {
- super(JSLPDiscoveryContainer.NAME, JSLPDiscoveryContainer.REDISCOVER);
+ super(JSLPDiscoveryContainer.NAME);
+ setWaitTimeForProvider(JSLPDiscoveryContainer.REDISCOVER);
+
+ //TODO-mkuppe https://bugs.eclipse.org/bugs/show_bug.cgi?id=230182
+ setComparator(new JSLPTestComparator());
+ //TODO-mkuppe https://bugs.eclipse.org/bugs/show_bug.cgi?id=218308
+ setScope("default");
}
}
diff --git a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryTest.java b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryTest.java
index b770245d1..c012db6da 100755
--- a/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.provider.jslp/src/org/eclipse/ecf/tests/provider/jslp/JSLPDiscoveryTest.java
@@ -10,7 +10,6 @@
******************************************************************************/
package org.eclipse.ecf.tests.provider.jslp;
-import org.eclipse.ecf.discovery.IServiceInfo;
import org.eclipse.ecf.provider.jslp.container.JSLPDiscoveryContainer;
import org.eclipse.ecf.tests.discovery.DiscoveryTest;
@@ -32,39 +31,13 @@ public class JSLPDiscoveryTest extends DiscoveryTest {
}
public JSLPDiscoveryTest() {
- super(JSLPDiscoveryContainer.NAME, JSLPDiscoveryContainer.REDISCOVER, new JSLPTestComparator());
+ super(JSLPDiscoveryContainer.NAME);
+ setWaitTimeForProvider(JSLPDiscoveryContainer.REDISCOVER);
+ //TODO-mkuppe https://bugs.eclipse.org/bugs/show_bug.cgi?id=230182
+ setComparator(new JSLPTestComparator());
+ //TODO-mkuppe https://bugs.eclipse.org/bugs/show_bug.cgi?id=218308
+ setScope("default");
}
-
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.tests.discovery.DiscoveryTest#testRegisterService()
- */
- public void testRegisterService() {
- testConnect();
- registerService();
- // SLP discovery doesn't search in all scopes and it is not possible to query for all reachable scopes, thus we need to pass the "local" scope
- final IServiceInfo[] services = discoveryContainer.getServices(serviceInfo.getServiceID().getServiceTypeID());
- assertTrue(services.length >= 1);
- for (int i = 0; i < services.length; i++) {
- final IServiceInfo service = services[i];
- if (comparator.compare(service, serviceInfo) == 0) {
- return;
- }
- }
- fail("Self registered service not found");
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ecf.tests.discovery.DiscoveryTest#testGetServices()
- */
- public void testGetServices() {
- testConnect();
- registerService();
- // SLP discovery doesn't search in all scopes and it is not possible to query for all reachable scopes, thus we need to pass the "local" scope
- final IServiceInfo[] services = discoveryContainer.getServices(serviceInfo.getServiceID().getServiceTypeID());
- assertTrue(services.length >= 1);
- }
-
public void testJSLPLocatorNull() {
//Activator.getDefault().getLocator() == null always
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 b1c3c4c5d..38a7c7c9c 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
@@ -18,14 +18,13 @@ 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.DiscoveryTestHelper;
import org.eclipse.ecf.tests.discovery.ServiceInfoTest;
public class JSLPServiceInfoTest extends ServiceInfoTest {
public JSLPServiceInfoTest() {
super();
- uri = DiscoveryTestHelper.createDefaultURI();
+ uri = createDefaultURI();
priority = 456;
weight = 789;
serviceProperties = new ServiceProperties();
@@ -34,7 +33,7 @@ public class JSLPServiceInfoTest extends ServiceInfoTest {
JSLPNamespace.NAME);
try {
serviceID = (IServiceID) IDFactory.getDefault().createID(namespace,
- new Object[] {DiscoveryTestHelper.SERVICE_TYPE, DiscoveryTestHelper.getHost()});
+ new Object[] {SERVICE_TYPE, getHost()});
} catch (IDCreateException e) {
fail(e.getMessage());
}

Back to the top