Summary: | jdt.core.model tests take 2 hours to finish on the mac | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Kim Moir <kim.moir> | ||||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | kent_johnson, Olivier_Thomann | ||||||
Version: | 3.4 | Flags: | Olivier_Thomann:
review+
|
||||||
Target Milestone: | 3.5 RC1 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Kim Moir
2009-04-29 12:05:30 EDT
We are failing to delete the test project's files after each test in org.eclipse.jdt.core.tests.model.ClasspathTests even after a 10 second delay this is the stack of the timeout: o.e.jdt.core.tests.util.Util.waitUntilResourceDeleted(1255) o.e.jdt.core.tests.util.Util.delete(419) o.e.jdt.core.tests.model.AbstractJavaModelTests.deleteResource(1676) o.e.jdt.core.tests.model.AbstractJavaModelTests.deleteProject(1645) o.e.jdt.core.tests.model.ClasspathTests.testOutputFolder1(5283) ClasspathTests has not changed since Feb.10th And in the Util class, the static method waitUntilResourceDeleted() was made public (from private) on April 21st - but that shouldn't matter. Looking at the individual test times ( search for 4.1 ), we start to see times of 4.172 & .541 seconds http://download.eclipse.org/eclipse/downloads/drops/I20090428-0100/testresults/html/org.eclipse.jdt.core.tests.model_macosx.cocoa.x86_5.0.html 10 pages of tests that all say they take over .5 second Some of the test classes are : ASTRewritingExpressionsTest ASTRewritingMethodDeclTest ASTRewritingStatementsTest ImportRewriteTest ASTRewritingWithStatementsRecoveryTest Forget about comment #2, those same tests take around .5 second in 3.5M6 In M6 the 3164 org.eclipse.jdt.core.tests.dom tests take 181.046 - so 3 hours! now the 3186 org.eclipse.jdt.core.tests.dom tests take 178.480 So we're actually a litte faster ;) M3 : 3149 dom tests took 167.917 3.4 : 3111 dom tests took 212.373 Kent, the problem is not on DOM/AST tests but rather on Java Model ones which have no results at all! If you look at the test results page you see that there are results only for two packages: org.eclipse.jdt.core.tests 1795 0 0 17.074 org.eclipse.jdt.core.tests.dom 3186 0 0 176.885 Although we're expecting to have three packages, e.g. the results of windows box: org.eclipse.jdt.core.tests 1795 0 0 32.469 org.eclipse.jdt.core.tests.dom 3186 0 0 215.735 org.eclipse.jdt.core.tests.model 6656 0 0 702.406 Note that the results disappeared between 3.5M1 and 3.5M2... OK, I think I get it. It seems that the origin of the problem is the testReadOnly() test of ClasspathTests. This test creates a project "P" and sets the .classpath file as read-only. At the end it deletes the project and I assume that on MacOSX, the folder cannot be removed as one of its file is read-only. The problem is that the method to delete the folder retries during 10s to remove it and this method is unfortunately called 60 times! So, 1O minutes is spent in this test trying to remove the created project. More unfortunate is that some following tests uses the same project name "P" and also try to remove it when they finish. As this project was not deleted on previous test, each of the subsequent tests also lasts 10 minutes trying to remove this same irremovable folder.. :-( The time-out is 7200 seconds for each test Ant target, hence the execution gives up after 12 tests. Unfortunately, it seems that the XML formatter used to run the tests does not flush at any time, hence no XML is produced and the final tests results looks correct although it should not... Created attachment 133952 [details]
Proposed patch
Just make the .classpath readable before deleting the project should be enough to fix the problem...
Created attachment 134170 [details]
New proposed patch
This patch also reduces time to wait for resource to be deleted while running model tests from 10 to 1 minute...
Olivier, could you please review? Thanks +1. Releasing since Frédéric is in vacations. Verified for 3.5RC1 using I20090512-2000. |