On 01/09/2013 02:33 PM, Martin Buchholz wrote:


On Wed, Jan 9, 2013 at 10:49 AM, Jim Gish <jim.g...@oracle.com <mailto:jim.g...@oracle.com>> wrote:


    I'm in the process of adding deletion retry behavior to jtreg, but
    in the meantime we think it makes sense to provide a more stable
    test environment by simply getting rid of the redundant deletes by
    the test itself.  There really is no need for tests to delete
    files from the scratch directory at the end of a test because
    jtreg carries a guarantee of cleanup.


I consider it good practice for a test to delete temporary files - it's just a java program that might be run outside of the test harness.
In general, I totally agree with you, and in fact I'm ok with putting the deletes back in after we have the retry logic in place in jtreg. I'll be happy to file a bug to revert this change. For now, we are trying very hard to have a stable set of tests. This one has been failing every couple of days.

Perhaps there's a deeper problem - why does the file system present inconsistent views? Is it a Windows bug?
It's a Windows feature. We discovered this recently in debugging another test failure. Windows is documented to do asynchronous deletes. You can't depend on a file.delete() which returns true to have actually deleted the file. It may be the case that another process has a file handle which it has not yet released, or it's simply a delay.

Thanks,
   Jim

--
Jim Gish | Consulting Member of Technical Staff | +1.781.442.0304
Oracle Java Platform Group | Core Libraries Team
35 Network Drive
Burlington, MA 01803
jim.g...@oracle.com

Reply via email to