Summary: | org.eclipse.jdt.core.tests.model.JavaSearchBugsTests.testBug323514a() is failing in N20101202-2000 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> | ||||||
Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | amj87.iitr, satyam.kandula, srikanth_sankaran | ||||||
Version: | 3.7 | ||||||||
Target Milestone: | 3.7 M4 | ||||||||
Hardware: | PC | ||||||||
OS: | Mac OS X - Carbon (unsup.) | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Olivier Thomann
2010-12-03 09:31:30 EST
(In reply to comment #0) > It looks like for some reason the jar file was not deleted or its index not > flushed. > > I cannot reproduce locally. This failed only on Mac. One possible reason: There is no change in the timestamp for the new jar. This seems to happen because of a file system limitation. Mac's filesystem doesnt support millisecond timestamps, and because of this sometimes when the updation of the jar file happens within milliseconds, the File.lastModified() returns the same timestamp. Making the thread to sleep for atleast a second solves this issue. http://stackoverflow.com/questions/2717936/file-createnewfile-creates-files-with-last-modified-time-before-actual-creation Created attachment 184578 [details]
proposed fix
(In reply to comment #3) > Created an attachment (id=184578) [details] > proposed fix The change looks good for me. +1 for the patch. Created attachment 184579 [details]
proposed fix extended to both tests
Putting the sleep in test b as well, for precaution.
Thanks for the help Satyam.
Released in HEAD for 3.7M4 Verified for 3.7M4 by code inspection. |