Hello, all. I'm hoping this message gets a response... I am running Lucene's unit tests against a custom Directory subclass (from Lucene Transform) using "-Dtests.directory=org.apache.lucene.store.transform.TransformedDirectoryLuceneTestWrapper". I've been banging my head against this one failure for a few hours. It happens from the command line ("ant test"), but not eclipse. I've narrowed it down using printf debugging. I am using the same random seed in both cases, though I've run it a lot without specifying the seed and I always find that it passes in eclipse and fails from the command line.
The failure is in TestIndexWriterCommit.testPrepareCommitRollback(). The second commit fails, because FSDirectory.ensureCanWrite() fails on the segment_2 file, because File.delete() fails on this file, causing FSDirectory to throw IOException. (I've checked that MockDirectoryWrapper isn't inserting a failure.) Also, I can see that during the test's rollback call, there are 3 attempts made to delete the file, which fail in the same way. I checked that Lucene Transform closes its handle to this file, so that shouldn't be blocking the deletion. And I don't see how any other code could open a handle to this file, since it's created in a temp directory created by Lucene Transform. I can't think of any reason for the difference between ant and eclipse! Please help! Thanks, Scott