[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipse-dev] Intermittent test failures on Windows - Make sure you close your files; also delete/rename issues

An additional step that we found useful in APT was to generate test
projects and files using unique numbers - e.g., testproj0001, and so
forth - serialized across the entire test run.  That way you're never
trying to tear down a project and set it up again at the same time.

  -Walter
 

> -----Original Message-----
> From: eclipse-dev-bounces@xxxxxxxxxxx 
> [mailto:eclipse-dev-bounces@xxxxxxxxxxx] On Behalf Of Francis Upton
> Sent: Friday, September 12, 2008 7:58 AM
> To: eclipse-dev@xxxxxxxxxxx
> Subject: [eclipse-dev] Intermittent test failures on Windows 
> - Make sure you close your files; also delete/rename issues
> 
> On Windows some of the tests fail sometimes with an exception 
> trying to close a resource.
> 
> This is caused by the file still being open.  Windows (unlike 
> Linux or the Mac) will not let you close a file that it is 
> still open.  However, this sometimes works, because a garbage 
> collection will close the file for you (provided the stream 
> is no longer referenced).
> 
> If you get this error, make sure the stream associated with 
> the file has been properly closed.
> 
> Here is an example of a previously fixed problem:
> 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=244610
> 
> Other causes of intermittent problems on windows have to do 
> with deleting and renaming.  Windows has issues that other 
> platforms don't have with the Java delete/rename.
> 
> For delete/rename to work reliably you have to check that it 
> actually worked and try again (possibly a few times, after a 
> small delay) to until it works.  There is probably some 
> common code somewhere that does this.  See Sun/Java bug #6213298.
> 
> If these issues are addressed, it should greatly reduce the 
> number of intermittent failures on Windows.
> 
> 
> Best,
> Francis