On Thu, 14 Feb 2013, Dawid Weiss wrote:
about the randomness: I think this should not be the case. if
different threads try to share the same random, actually there should
be an exception from the test framework saying that each thread should
get its own random (eg. initialized by a long value)
> This one:
> lucene/core/src/test/org/apache/lucene/search/TestSort.java
Yeah, I figured by comparing the size of these three... So, to make it
short -- every thread should get its own Random instance from a call
to LuceneTestCase's
public static Random random() {
return RandomizedContex
Hi folks,
> about the randomness: I think this should not be the case. if
> different threads try to share the same random, actually there should
> be an exception from the test framework saying that each thread should
> get its own random (eg. initialized by a long value). So lucene-java
> tests
> So, if each thread gets the same seed, then they should also get the same
> random values, right ?
They would start from the same seed so if they're calling that Random
in the same pattern then yes -- they'd get the same values. Any real
randomness will be non-reproducible. If this is needed fo