Community
Participate
Working Groups
Version: 3.8.0 Build id: I20111005-0925 code from master. While running a bunch of tests using Java 7 I was getting some odd and inconsistent failures. One was an NPE in ClassFileScannerTests#testScanInnerStaticInnerClass() - caused because the test relies on an earlier test to set up the environment. We should do a full pass of the test suite to find other tests that could fail in the same manner.
Just got another failure in ApiBaselineManagerTests#testCleanupManager() because the test it relies on to fill the manager had not been run yet.
I did a pass over the tests for API tools and I have them all passing on my windows and linux machines. I pushed the changes to master - Curtis, Dani, Ankur, please run the test suites using Java 7 to see if there is anything I missed.
Created attachment 205113 [details] API Tools test failures I encountered 6 failures. On first look, they look genuine. So will investigate more and post the findings. API Tools Plugin Test Suite org.eclipse.pde.api.tools.tests.ApiToolsPluginTestSuite org.eclipse.pde.api.tools.builder.tests.ApiBuilderTest org.eclipse.pde.api.tools.builder.tests.usage.UsageTest org.eclipse.pde.api.tools.builder.tests.usage.Java7ClassUsageTests testTryWithF(org.eclipse.pde.api.tools.builder.tests.usage.Java7ClassUsageTests) junit.framework.AssertionFailedError: Should not be a JDT error:TryWithResourcesClass cannot be resolved to a type testTryWithI(org.eclipse.pde.api.tools.builder.tests.usage.Java7ClassUsageTests) junit.framework.AssertionFailedError: Should not be a JDT error:TryWithResourcesClass cannot be resolved to a type org.eclipse.pde.api.tools.anttasks.tests.ApiToolsAntTasksTestSuite org.eclipse.pde.api.tools.anttasks.tests.ApiToolingAnalysisAntTaskTests test1(org.eclipse.pde.api.tools.anttasks.tests.ApiToolingAnalysisAntTaskTests) junit.framework.AssertionFailedError: deltatest folder must exist test5(org.eclipse.pde.api.tools.anttasks.tests.ApiToolingAnalysisAntTaskTests) junit.framework.AssertionFailedError: deltatest folder must exist test6(org.eclipse.pde.api.tools.anttasks.tests.ApiToolingAnalysisAntTaskTests) junit.framework.AssertionFailedError: deltatest2 folder must exist test7(org.eclipse.pde.api.tools.anttasks.tests.ApiToolingAnalysisAntTaskTests) junit.framework.AssertionFailedError: deltatest folder must exist
(In reply to comment #3) > Created attachment 205113 [details] > API Tools test failures > > I encountered 6 failures. On first look, they look genuine. So will investigate > more and post the findings. Looks like the builder tests failed to build the class files and the Ant tests were failing to create resources. Ankur, was there anything written out to the console? Any ResourceExceptions? Which Java 7 JDK were you using?
(In reply to comment #4) > (In reply to comment #3) > > Created attachment 205113 [details] [details] > > API Tools test failures > > > > I encountered 6 failures. On first look, they look genuine. So will investigate > > more and post the findings. > > Looks like the builder tests failed to build the class files and the Ant tests > were failing to create resources. Ankur, was there anything written out to the > console? Any ResourceExceptions? Which Java 7 JDK were you using? I can reproduce the test failures that Ankur is describing (they are the only test failures I get). Related output in the console: org.eclipse.core.internal.resources.ResourceException: Resource '/APIPluginTests/.settings' does not exist. at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:341) at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:215) at org.eclipse.core.internal.resources.Container.members(Container.java:266) at org.eclipse.core.internal.resources.Container.members(Container.java:249) at org.eclipse.pde.api.tools.internal.ApiFilterStore$1.runInWorkspace(ApiFilterStore.java:150) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) !SUBENTRY 1 org.eclipse.core.resources 4 368 2011-10-17 11:38:09.025 !MESSAGE Resource '/APIPluginTests/.settings' does not exist. Unexpected JDT Marker TryWithResourcesClass cannot be resolved to a type
With JRE 7 I also always get the following two failures: - Java7ClassUsageTests.testTryWithF() - Java7ClassUsageTests.testTryWithI() BUT, also the other tests are definitely not yet stable. I get (different) failures when running JRE 6 and JRE 7 and often on a second run the tests showed different failures or were green again. For example using JRE 1.7.0 IBM J9 2.6 Windows 7 x86-32 20110810_88604 I first got this in addition to the 2 mentioned above: - InterfaceCompatibilityTypeParameterTests.testAddSecondaryTypeParameterF() Then on the second run I got this in addition to the 2 mentioned above: - FieldCompatibilityModifierTests.testProtectedToPrivateF() And with Oracle JRE 7 Update 1 I got - ClassCompatibilityFieldTests.testRemoveProtectedFieldNoInstantiateF() And when running on Oracle JRE 6 I got: - ClassCompatibilityMemberTypeTests.testProtectedToPrivateF() I always ran 'ApiToolsPluginTestSuite'. Note: No problems running 'ApiToolsTestSuite'.
Ankur said he had made some progress here on the status call.
Created attachment 206452 [details] Patch Curtis, let me know when its ok to apply it
(In reply to comment #8) > Created attachment 206452 [details] > Patch > > Curtis, let me know when its ok to apply it If the patch fixes the tests, you should commit it. I'll try to leave some time today to test it.
(In reply to comment #9) > I'll try to leave some time today to test it. looks like Ankur committed the patch: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=48b6a2d8ed2eb56ca0539b1484ef7b1c4c961d32
pushed fixes to http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=1d02c2db9b10c37ed55377b8ffb650623c9f3822.
Curtis found an interesting relationship in the tests that caused some of the Java 7-specific ones to fail. I pushed a fix to: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=780d4ddb0e96b578e4b4e4ede271b6eff255981d
Verified that the tests now all pass for me.
Verified
It is much more stable now. I only got one transient failure during my testing: With JRE 1.7.0 IBM J9 2.6 Windows 7 x86-32 20110810_88604 (JIT enabled, AOT enabled) the following failed once: org.eclipse.pde.api.tools.builder.tests.compatibility.InvalidSinceTagTests.testInvalidMethodF()