On Sun, Dec 11, 2011 at 7:35 PM, Ted Dunning <ted.dunn...@gmail.com> wrote:

> The right way to handle this is to have instances get a random number
> generator that works like it should.  Magic resets in the middle of
> operation are not a good idea.
>

Why would the caller care? It's all random numbers, whether "reset" or not.


>
> I think we need a better way to inject generators that doesn't involve
> statics.
>
>
There is no way to control and reset Randoms other than what's done in
RandomWrapper (with statics). If you think deterministic tests are a good
goal, there's no argument with this, as it's the only way to do it. (And if
you don't agree that's another conversation -- but we do need this.)

To be clear: the injection is not at all the issue here. I'm happy to write
an essay on this, but, the punchline is: there is virtually no way to have
deterministic tests in one JVM while running all the tests in parallel. We
were pursuing means to execute subsets of the tests in parallel in
different JVMs, which can work and does work. We haven't yet found a way to
do it in Maven.

Reply via email to