Community
Participate
Working Groups
BUILD ID: N20131204-2000 Test Results Location: http://download.eclipse.org/eclipse/downloads/drops4/N20131204-2000/testresults/html/org.eclipse.jdt.core.tests.model_win32.win32.x86_7.0.html testAddNonJavaResourcePackageFragmentRoot incorrect non java resources. ----------- Expected ------------ /JavaProjectTests/.classpath\n /JavaProjectTests/.project\n /JavaProjectTests/.settings\n /JavaProjectTests/TestNonJavaResource.abc ------------ but was ------------ /JavaProjectTests/.classpath\n /JavaProjectTests/.project\n /JavaProjectTests/.settings --------- Difference is ---------- expected:<...ojectTests/.settings[\n /JavaProjectTests/TestNonJavaResource.abc]> but was:<...ojectTests/.settings[]> junit.framework.ComparisonFailure: incorrect non java resources. ----------- Expected ------------ /JavaProjectTests/.classpath\n /JavaProjectTests/.project\n /JavaProjectTests/.settings\n /JavaProjectTests/TestNonJavaResource.abc ------------ but was ------------ /JavaProjectTests/.classpath\n /JavaProjectTests/.project\n /JavaProjectTests/.settings --------- Difference is ---------- expected:<...ojectTests/.settings[\n /JavaProjectTests/TestNonJavaResource.abc]> but was:<...ojectTests/.settings[]> at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertStringEquals(TestCase.java:238) at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertEquals(TestCase.java:214) at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.assertResourcesEqual(AbstractJavaModelTests.java:546) at org.eclipse.jdt.core.tests.model.JavaProjectTests.testAddNonJavaResourcePackageFragmentRoot(JavaProjectTests.java:426) 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: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:109) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226) 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)
Looks like 'JavaProjectTests' is unstable in general. See also bug 409466 and bug 403414. It looks like this test depends on the order of the test methods. If you compare where it fails against a good run, you see different order, e.g. in the case where it fails, testAddZIPArchive* is called *after* the failed test. ==> In your workspace run the 'JavaProjectTests' test methods like in the failing case. I suspect you get the same failure. If that's the case use org.eclipse.test.OrderedTestSuite to fix the problem.
The comment 1 is correct about the order. I had two test cases testAddNonJavaResourcePackageFragmentRoot testAddZIPArchive1 as part of test suite. If the test case testAddNonJavaResourcePackageFragmentRoot runs before testAddZIPArchive1 the test fails. If the order is reversed both the tests succeed. The failure stack trace looks different from the reported stack trace in comment 0. The failure stack trace: Java Model Exception: Java Model Status [JavaProjectTests does not exist] 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.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.internal.core.JavaProject.getPackageFragmentRoots(JavaProject.java:1849) at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.getPackageFragmentRoot(AbstractJavaModelTests.java:2103) at org.eclipse.jdt.core.tests.model.JavaProjectTests.testAddNonJavaResourcePackageFragmentRoot(JavaProjectTests.java:411) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at junit.framework.TestCase.runTest(TestCase.java:176) at junit.framework.TestCase.runBare(TestCase.java:141) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131) 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:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) 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)
Ran out of time, moving to M5.
Please see Bug 424786 and Bug 409466.
Moving to 4.4. M7.
The tests suite does not fail even if testAddNonJavaResourcePackageFragmentRoot executes before testAddZIPArchive1. The file JavaProjectTests.java hasn't changed in the last 10 months.
Created attachment 242136 [details] Patch The patch sorts the tests in alphabetical order and then executes them. This is done so that following order is maintained. testAddNonJavaResourcePackageFragmentRoot testAddZIPArchive* Please see: Comment 1 and Comment 2. I have used the API: buildModelTestSuite instead of using org.eclipse.test.OrderedTestSuite as it leads to minimal changes and I do not see a way to use it with buildModelTestSuite. Thanks
Thanks Shankha, I have released the patch in master: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=64774f020d7005b54827ff53032895aaf4555d81 This and the fact that the failure hasn't occurred during the last two milestones hopefully means this is buried forever.
Verified for 4.4 M7 using I20140428-2000 build
(In reply to Jayaprakash Arthanareeswaran from comment #8) > Thanks Shankha, I have released the patch in master: > > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=64774f020d7005b54827ff53032895aaf4555d81 > > This and the fact that the failure hasn't occurred during the last two > milestones hopefully means this is buried forever. Nope :-( http://download.eclipse.org/eclipse/downloads/drops4/I20140512-2000/testresults/html/org.eclipse.jdt.core.tests.model_win32.win32.x86_7.0.html
(In reply to Jayaprakash Arthanareeswaran from comment #8) > Thanks Shankha, I have released the patch in master: > > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=64774f020d7005b54827ff53032895aaf4555d81 > > This and the fact that the failure hasn't occurred during the last two > milestones hopefully means this is buried forever. The patch doesn't seem to have any effect on the order in the official build/test environment!
(In reply to Jayaprakash Arthanareeswaran from comment #11) > The patch doesn't seem to have any effect on the order in the official > build/test environment! Please ignore this. In fact, the order doesn't seem to have any impact on the test result/failure.
Shankha, in the interest of having clean results throughout the remaining Luna cycles, I think we should disable the concerned tests and take it up during 4.5
Created attachment 243159 [details] Patch The test has been disabled. Will continue investigate the reason for the failure.
We don't have any fix yet, so the test has been disabled for now. But keeping the bug with 4.5 target so we don't loose sight of this.
New Gerrit change created: https://git.eclipse.org/r/58901
I have enabled the tests back with a fix here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=15c0d9ce2c57a5a820b317d31ba95f4dca3c8294 The tests pass locally, of course, but needs to be seen how they do in the build environment.
(In reply to Jay Arthanareeswaran from comment #17) > I have enabled the tests back with a fix here: > > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/ > ?id=15c0d9ce2c57a5a820b317d31ba95f4dca3c8294 This also covers bug 409466 and bug 403414.
The last few builds have been successful with the fix. Will keep it around during M4 before closing this, though.
*** Bug 409466 has been marked as a duplicate of this bug. ***
*** Bug 403414 has been marked as a duplicate of this bug. ***
The tests have now been enabled and released with fix. The fix is one or more of the following depending on cases: 1. Waiting for manual refresh and auto build before checking for build results. 2. Removing projects before end of current test case, to avoid dependency. 3. Keeping the order constant (use order of declaration of tests in CU) 4. Some other clean-ups. *** This bug has been marked as a duplicate of bug 464369 ***
Verified for Eclipse Neon Version: Neon 4.6M4 Build id: I20151207-0800