carrotsearch/randomizedtesting — pull request #177 by s1monw (2014-10-28 13:09:50+00:00)
Title: Add util method to execute code in private random context

Today calls to RandomizedTest#randomInt() etc. always use the current
thread local context and the randomness on top of it's stack. In certain
situations for instance if a method produces a configuration or a infrastructure
resource that should be reproducible calls using the threadlocal context can poision
the random sequence and destroy reproducibilty. This commit adds a utiltiy
that allows to run such a method with a new randomness instance to ensure reproducibiilty
even if the code that is executed in this context uses the threadlocal random context.