This looks like a perfect use case for the randomized testing runner deployed
in Lucene that Isabel mentioned a while ago. That runner picks a random seed
but dumps it in stack traces etc. so that test runs can be reproduced
if failing (at least in theory if there are no other data races,
etc.).

http://labs.carrotsearch.com/randomizedtesting.html

The default RandomizedRunner comes with a somewhat stricter checks for
thread leaks etc but these can be turned off leaving just what regular
junit runner does. I can't offer my time for doing the heavy lifting
but I can help and offer guidance if needed.

Just my two cents,
Dawid

On Tue, Sep 4, 2012 at 8:54 AM, Dmitriy Lyubimov <[email protected]> wrote:
> Hello,
>
> i have a question regarding line 344 in SSVDSolver:
>
>
> Random rnd = RandomUtils.getRandom();
>
> This random generator is used to obtain initial seed for random matrix
> of SSVD. It used to be just "new Random()" but at some point
> apparently was replaced with that util call.
>
> At least in unit test this seems to result in situation that unit test
> essentially gets a deterministic random gen. My guess is the intent is
> to keep unit tests from failing non-deterministically from time to
> time.
>
> but am i right assuming that outside of Mahout's unit test this
> actually will always be non-deterministic and I will be getting
> different seeds? Cause if i don't, i think that's a problem.
>
> Thanks.
> -Dmitriy
>

Reply via email to