Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321450

Summary: [Discovery][Composite] Replace bundle life cycle control with OSGi ServiceHooks
Product: [RT] ECF Reporter: Markus Kuppe <bugs.eclipse.org>
Component: ecf.testAssignee: Markus Kuppe <bugs.eclipse.org>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3.0   
Target Milestone: 3.4.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
WIP
none
mylyn/context/zip none

Description Markus Kuppe CLA 2010-08-01 05:05:18 EDT
To prevent the CompositeDiscoveryContainer from finding a certain container (e.g. JmDNS or jSLP) the tests simply stop the corresponding bundle. This causes problems on the build machine with non resolvable bundles. Instead of fiddling with the resolver, the tests should use a FindHook instead.

org.osgi.framework.BundleException: The bundle "org.eclipse.ecf.provider.jslp_3.0.0.v20100730-2041 [60]" could not be resolved. Reason: Missing Constraint: Import-Package: ch.ethz.iks.slp; version="[1.0.0,2.0.0)"
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1301)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)
	at org.eclipse.ecf.tests.provider.discovery.SingleCompositeDiscoveryServiceContainerTest.tearDown(SingleCompositeDiscoveryServiceContainerTest.java:108)
	at junit.framework.TestCase.runBare(TestCase.java:140)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
	at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Markus Kuppe CLA 2010-08-01 07:42:22 EDT
Created attachment 175668 [details]
WIP
Comment 2 Markus Kuppe CLA 2010-08-01 07:42:27 EDT
Created attachment 175669 [details]
mylyn/context/zip
Comment 3 Markus Kuppe CLA 2010-08-03 05:56:45 EDT
Updating title to reflect the fact that it now also uses an EventHook to filter asynchronous service events triggered by the bundle activation forced by ECF's namespace EP
Comment 4 Markus Kuppe CLA 2010-08-03 08:16:51 EDT
Fix released to HEAD, verified in build https://build.ecf-project.org/hudson/job/C-HEAD-discovery.feature/65/console