lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (" <>
Subject Re: Possible problem with RAMDirectory; tips please
Date Mon, 08 Apr 2013 20:51:21 GMT
Thanks for that tip Dawid.  I'll consider AspectJ some day; that's an
interesting approach.

So as it turns out, I was wrong when I said that the same shapes etc. were
being tested when I switched the directory via the system property.  I
thought I checked for that but apparently I got confused.  I do find it
disconcerting that the random seed can get incremented by
LuceneTestCase.newDirectory() a different number of times depending on
wether or not -Dtests.seed has been set.  This makes it difficult to make a
test that uses randomization to "just" change the directory for a given test
run (i.e. for a given seed).  It would be nice if there was a mechanism to
restore the random state so you could restore it from when it was captured
at the beginning of a method call.  This wouldn't just apply to
newDirectory() but to some other similar utility methods.

~ David

View this message in context:
Sent from the Lucene - Java Developer mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message