Community
Participate
Working Groups
The following test method does a persistent stop and start of the core.resources bundle. For Kepler this does not seem to be causing any bad side-effects, but for the luna OSGi framework it ends up causing all subsequent session tests to fail because the platform fails to start. The reason is the resources bundle gets eagerly activated before the core.runtime bundle and then it ends up getting an error from the InternalPlatform class when it tries to use it before core.runtime is initialized (started). org.eclipse.core.tests.resources.session.TestBug297635.test2()
I think it would be good to use Bundle.STOP_TRANSIENT and Bundle.START_TRANSIENT for the calls to Bundle.stop/start. To be clear this may be necessary for Luna, but will not hurt for Kepler. I did investigate more on why this is failing on the new unity framework implementation. It turns out that the Kepler framework is lazily activating bundles that defined a lazy activation policy (using header Bundle-ActivationPolicy: lazy) even when they are marked for eager activation. The org.eclipse.core.runtime bundle is always in this state since it is marked for eager activation by default in our products, but it also defines the lazy activation policy. This seems important and likely something I need to ensure the behavior remains in Luna. See bug 408629 to track this.
Glad to hear our bogus test was helpful ;)
Fixed: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=b7c8b94cc7d9b5d345adbb10342d624f1b905473