lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Schneider <>
Subject Unit test help
Date Fri, 20 Dec 2013 23:51:52 GMT
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 "".
 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

Please help!


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message