Are you sure each test always closes the IndexWriter?
Still, it's best to have each test uses its own directory to avoid any
risk of confusing failures ...
Mike McCandless
http://blog.mikemccandless.com
On Thu, Jul 25, 2013 at 12:24 PM, Yonghui Zhao wrote:
> My test case first create an empty
My test case first create an empty disk index folder then feed some doc
then do some query.
I purge the index by delete all files in the folder.
My unit test has several test cases they use same directory in the disk.
But it runs one by oneļ¼and I dont think there will be 2 threads use the
directo
Can you describe what your test is doing? How do you "purge the
index"? It's best to open IndexWriter with OpenMode.CREATE to purge
(rather than remove the files yourself).
Lock obtain timed out means another IndexWriter is currently using
that directory.
Mike McCandless
http://blog.mikemcca
Recently I find my unit test will failed sometimes but no always. I use
Lucene 4.3.0
After inverstigation, I found when I try to open a IndexWriter for a disk
directory.
Some time it will throw this exception:
org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out:
NativeFSLoc