[
https://issues.apache.org/jira/browse/RNG-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16689333#comment-16689333
]
Alex D Herbert commented on RNG-60:
-----------------------------------
This commit changes the tests to have a rerun count of 2.
Most of the tests have a significance threshold of 1%. This means that the
likelihood of any standalone test failing is 0.01^3 or 0.00001% of the time.
However some tests still remain as compound tests. For example the
{{ProvidersCommonParametricTest.testUniformNextIntegerInRange}} test runs
{{checkNextIntegerInRange}} 9 times.
Assuming a binomial distribution with trials n=9 and success p=0.99 then the
probability of a failure of any of the 9 tests P(X<x) with x=9 is 0.0864. So
this test will fail 8.6% of the time.
If Junit is rerun up to 2 times then trials n=3, p=0.0864 and the P(X<=x) with
x=1 is 0.979. So the test with reruns will pass 97.9% of the time. This is done
for 16 different providers and the odds of a pass will greatly reduce.
This fix may be robust for the single standalone tests but some of the compound
tests may need to be separated into single tests. Then JUnit can be rerun for
each test that fails and not a collection of tests.
> Random seeds in "ProvidersList" (unit tests)
> --------------------------------------------
>
> Key: RNG-60
> URL: https://issues.apache.org/jira/browse/RNG-60
> Project: Commons RNG
> Issue Type: Task
> Components: core
> Affects Versions: 1.1
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Labels: unit-test
> Fix For: 1.2
>
>
> Unit tests for the RNG "providers" should demonstrate some robustness wrt the
> seed passed to them.
> The currently fixed seeds will be replaced by values obtained from a JDK's
> {{SecureRandom}} instance.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)