Bug 408619 - TestBug297635.test2() does persistent start of the resources bundle
Summary: TestBug297635.test2() does persistent start of the resources bundle
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 4.3   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.3 RC2   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2013-05-21 14:17 EDT by Thomas Watson CLA
Modified: 2013-05-22 09:42 EDT (History)
0 users

See Also:
tjwatson: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2013-05-21 14:17:39 EDT
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()
Comment 1 Thomas Watson CLA 2013-05-21 16:03:49 EDT
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.
Comment 2 John Arthorne CLA 2013-05-21 16:32:47 EDT
Glad to hear our bogus test was helpful ;)