Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321450 - [Discovery][Composite] Replace bundle life cycle control with OSGi ServiceHooks
Summary: [Discovery][Composite] Replace bundle life cycle control with OSGi ServiceHooks
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.test (show other bugs)
Version: 3.3.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.4.0   Edit
Assignee: Markus Kuppe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-01 05:05 EDT by Markus Kuppe CLA
Modified: 2010-08-03 08:16 EDT (History)
0 users

See Also:


Attachments
WIP (12.19 KB, patch)
2010-08-01 07:42 EDT, Markus Kuppe CLA
no flags Details | Diff
mylyn/context/zip (167.94 KB, application/octet-stream)
2010-08-01 07:42 EDT, Markus Kuppe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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