lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <yo...@lucidimagination.com>
Subject Re: Lucene-Solr-tests-only-3.x - Build # 1950 - Failure
Date Mon, 29 Nov 2010 20:20:31 GMT
On Mon, Nov 29, 2010 at 2:52 PM, Michael McCandless
<lucene@mikemccandless.com> wrote:
> Though why doesn't the random seed reproduce it?

OK, I think I see why.
For reproducibility, the same random number generator should never be
used across different threads.
RandomIndexWriter does though... (via MockIndexWriter.testPoint).

  public RandomIndexWriter(Random r, Directory dir, IndexWriterConfig
c) throws IOException {
    this.r = r;
    w = new MockIndexWriter(r, dir, c);

So something like this should work?

    w = new MockIndexWriter(new Random(r.nextInt()), dir, c);


-Yonik
http://www.lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message