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

Bug 461800

Summary: 4 api tool test fail in nightly build
Product: [Eclipse Project] PDE Reporter: Vikas Chandra <Vikas.Chandra>
Component: API ToolsAssignee: Vikas Chandra <Vikas.Chandra>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, pascal
Version: 4.5   
Target Milestone: 4.5 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Vikas Chandra CLA 2015-03-10 07:22:14 EDT
testDependents	Failure	Wrong number of dependents expected:<2> but was:<0>

junit.framework.AssertionFailedError: Wrong number of dependents expected:<2> but was:<0>
at org.eclipse.pde.api.tools.model.tests.ApiBaselineTests.testDependents(ApiBaselineTests.java:290)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:657)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:36)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:32)
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:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
at org.eclipse.core.launcher.Main.main(Main.java:34)
	0.136
testResolvePackage	Failure	Wrong size expected:<1> but was:<0>

junit.framework.AssertionFailedError: Wrong size expected:<1> but was:<0>
at org.eclipse.pde.api.tools.model.tests.ApiBaselineTests.testResolvePackage(ApiBaselineTests.java:77)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:657)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:36)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:32)
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:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
at org.eclipse.core.launcher.Main.main(Main.java:34)
	0.134
testPrerequisites	Failure	Missing prerequisite bundle

junit.framework.AssertionFailedError: Missing prerequisite bundle
at org.eclipse.pde.api.tools.model.tests.ApiBaselineTests.testPrerequisites(ApiBaselineTests.java:279)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:657)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:310)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:36)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:32)
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:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)



See http://download.eclipse.org/eclipse/downloads/drops4/N20150309-2000/testresults/html/org.eclipse.pde.api.tools.tests_linux.gtk.x86_64_8.0.html
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Comment 1 Vikas Chandra CLA 2015-03-10 09:50:14 EDT
Works ok with 

Version: Mars (4.5)
Build id: N20150309-1000

and latest PDE code

Waiting for next build result.
Comment 2 Vikas Chandra CLA 2015-03-11 06:04:30 EDT
New 4 failure after fix to Bug 461653 was commited.

I cant recreate this on my local machine. Could the commit to Bug 461653 cause this?
Comment 3 Pascal Rapicault CLA 2015-03-11 08:46:01 EDT
The code I changed only impacts (In reply to Vikas Chandra from comment #2)
> New 4 failure after fix to Bug 461653 was commited.
> 
> I cant recreate this on my local machine. Could the commit to Bug 461653
> cause this?
  I doubt it because all the code changes relate to the export of products, and most of them are guarded by a test on the OS.
Comment 4 Vikas Chandra CLA 2015-03-11 09:07:20 EDT
I will download latest build and try to recreate on my machine.
Comment 6 Vikas Chandra CLA 2015-03-12 06:15:29 EDT
I am able to recreate 4 api tool error with new eclipse and clean workspace.
Comment 7 Vikas Chandra CLA 2015-03-12 09:46:06 EDT
For this case the bundle component.a_1.0.0 is not resolved because  its required bundle org.eclipse.core.runtime doesnt resolve. org.eclipse.core.runtime doesn't resolve because one of its many require bundle doesn't resolve.

To see this issue, put a conditional breakpoint of 
bundle.toString().contains("a_1.") or bundle.toString().contains("org.eclipse.core.runtime")

on 1st line of

org.eclipse.osgi.internal.module.ResolverImpl::resolveBundle(ResolverBundle bundle, List<ResolverBundle> cycle) {
Comment 8 Curtis Windatt CLA 2015-03-12 13:50:44 EDT
(In reply to Vikas Chandra from comment #6)
> I am able to recreate 4 api tool error with new eclipse and clean workspace.

After updating to the latest I build, I cannot reproduce the test failures.  The ApiBaselineTests are part of the API Tools Test Suite, which gets the list of bundles from a VM argument (-DrequiredBundles).  Can you determine why the core.runtime bundle couldn't resolve?
Comment 9 Curtis Windatt CLA 2015-03-12 16:54:23 EDT
(In reply to Curtis Windatt from comment #8)
> (In reply to Vikas Chandra from comment #6)
> > I am able to recreate 4 api tool error with new eclipse and clean workspace.
> 
> After updating to the latest I build, I cannot reproduce the test failures. 
> The ApiBaselineTests are part of the API Tools Test Suite, which gets the
> list of bundles from a VM argument (-DrequiredBundles).  Can you determine
> why the core.runtime bundle couldn't resolve?

I can reproduce now.  When I updated it did not garbage collect the old version of org.eclipse.core.contenttype from my plug-ins folder.  The state could still resolve by using the old version.  I simply deleted the old version to reproduce.

The failures are caused by org.eclipse.core.contenttype recently moving to a 1.7 BREE.

The baseline tests are not run as a plug-in test, so they don't have access to the full list of EE profiles from OSGi.  Instead they use a list stored inside the API Tools plugin: org.eclipse.pde.api.tools.internal.util.profiles

There is no 1.7 profile there so the baseline can't resolve
Comment 10 Curtis Windatt CLA 2015-03-12 17:45:41 EDT
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=c8bf2e45866e29a04df7cc83ceb54b69f2e34b14
I added the 1.7 and 1.8 profiles from the OSGi plug-in to the list inside api tools.  Also added some comments to the tests to help make tracking down issues like this faster in the future.
Comment 11 Curtis Windatt CLA 2015-03-12 17:49:25 EDT
(In reply to Curtis Windatt from comment #10)
> http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/
> ?id=c8bf2e45866e29a04df7cc83ceb54b69f2e34b14
> I added the 1.7 and 1.8 profiles from the OSGi plug-in to the list inside
> api tools.  Also added some comments to the tests to help make tracking down
> issues like this faster in the future.

After cleaning up some changes I made to the TestHelper (where it creates a dummy EE profile), the failures return.  Perhaps we need to have both the profile in the api tools plug-in as well as change the test's EE to a higher profile.  Vikas, can you please check this before M6?
Comment 12 Vikas Chandra CLA 2015-03-13 09:17:44 EDT
Changing the Dee.class.library.level=JavaSE-1.7" in getEEDescriptionFile for TestSuiteHelper fixes this. A commit will follow.
Comment 13 Vikas Chandra CLA 2015-03-13 09:21:54 EDT
The commit id corresponding to previous comment is
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=05ba744d942c4374832c583ed1ea1ddaca0d1eda
Comment 14 Vikas Chandra CLA 2015-03-14 08:39:50 EDT
Verified in  4.5 N20150313-2000

See

http://download.eclipse.org/eclipse/downloads/drops4/N20150313-2000/testResults.php