Bug 403414 - Error from JavaProjectTests.testRootGetPackageFragments3
Summary: Error from JavaProjectTests.testRootGetPackageFragments3
Status: VERIFIED DUPLICATE of bug 423280
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.6 M4   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL: http://download.eclipse.org/eclipse/d...
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2013-03-15 04:38 EDT by Dani Megert CLA
Modified: 2015-12-08 03:52 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2013-03-15 04:38:04 EDT
I20130314-1330.

JavaProjectTests.testRootGetPackageFragments3 fails with an error.

/P1 [in P2] is not on its project's build path

Java Model Exception: Java Model Status [/P1 [in P2] is not on its project's build path]
at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:508)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:246)
at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:521)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:258)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:244)
at org.eclipse.jdt.internal.core.JavaElement.getChildren(JavaElement.java:199)
at org.eclipse.jdt.core.tests.model.JavaProjectTests.testRootGetPackageFragments3(JavaProjectTests.java:2244)
at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.runTest(SuiteOfTestCases.java:104)
at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.superRun(SuiteOfTestCases.java:88)
at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$1.protect(SuiteOfTestCases.java:76)
at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.run(SuiteOfTestCases.java:85)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:655)
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:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 1 Dani Megert CLA 2013-03-15 04:39:55 EDT
Jay, please take a look and add another comment to bug 403321, where you already declared the GO for JDT Core.
Comment 3 Jay Arthanareeswaran CLA 2013-03-20 13:00:19 EDT
Just by looking at the test case, I don't think there is anything that would cause this failure. Perhaps some multi threading is going on here. Having some other tests using the same project name and deleting them could be interfering here too.

To rule that out, I will fix the test project names to being unique and see if that helps.
Comment 4 Jay Arthanareeswaran CLA 2013-03-21 00:02:31 EDT
It's possible that there is some delay in deletion in of some resources. I have made some minor adjustments in the failing test to avoid the name conflicts. Will wait and see how this helps.
Comment 5 Jay Arthanareeswaran CLA 2013-03-25 00:58:08 EDT
(In reply to comment #4)
> It's possible that there is some delay in deletion in of some resources. I
> have made some minor adjustments in the failing test to avoid the name
> conflicts. Will wait and see how this helps.

Apparently not. This happened again:

http://download.eclipse.org/eclipse/downloads/drops4/N20130322-2000/testresults/html/org.eclipse.jdt.core.tests.model_win32.win32.x86_7.0.html
Comment 7 Jay Arthanareeswaran CLA 2013-04-24 09:36:25 EDT
(In reply to comment #6)
> It happened two times in a row now:
> 
> http://download.eclipse.org/eclipse/downloads/drops4/I20130423-0800/
> testresults/html/org.eclipse.jdt.core.tests.model_win32.win32.x86_7.0.html
> 
> http://download.eclipse.org/eclipse/downloads/drops4/N20130423-2000/
> testresults/html/org.eclipse.jdt.core.tests.model_win32.win32.x86_7.0.html

Looking at the PackageFragmentRoot#validateExistence(), the error could occur if the project entry is not in the classpath or if the project resource is not accessible for some reason.

However, the .classpath modification, reading classpath and updating the classpath of a project all happen at the same thread and I can't possibly imagine why it won't be part of the classpath. So, that possibly means the project is not accessible/open for some reason. I will try and see if I can simulate such a scenario.
Comment 8 Jay Arthanareeswaran CLA 2013-04-30 08:44:59 EDT
Haven't made any breakthrough on this yet. I will have to disable the test for the time being and take a fresh look at it post Kepler time frame.
Comment 9 Jay Arthanareeswaran CLA 2013-04-30 08:56:54 EDT
Disabled the test for windows. The tests will continue to run for other OS configurations.
Comment 10 Dani Megert CLA 2013-05-16 03:35:46 EDT
(In reply to comment #9)
> Disabled the test for windows. The tests will continue to run for other OS
> configurations.

Failed on Linux this time:
http://download.eclipse.org/eclipse/downloads/drops4/I20130515-2000/testresults/html/org.eclipse.jdt.core.tests.model_linux.gtk.x86_6.0.html


==> let's disable it on all platforms for Kepler.
Comment 11 Jay Arthanareeswaran CLA 2013-05-16 05:50:31 EDT
(In reply to comment #10)
> ==> let's disable it on all platforms for Kepler.

Done.
Comment 12 Jay Arthanareeswaran CLA 2014-02-26 11:37:53 EST
Manoj, can you see if the failing test can be fixed and enabled again? Thanks!
Comment 13 Jay Arthanareeswaran CLA 2014-05-14 08:07:54 EDT
So well in to RCs, and no fix or possible theories available, I don't want to enable the tests with trouble shooting codes. But during early 4.5, we should do that.
Comment 14 Jay Arthanareeswaran CLA 2015-10-29 01:28:20 EDT
The test is enabled back again on all platform and being tracked in bug 423280.

*** This bug has been marked as a duplicate of bug 423280 ***
Comment 15 Manoj N Palat CLA 2015-12-08 03:52:47 EST
Verified for Eclipse Neon Version: Neon 4.6M4 Build id: I20151207-0800