commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [10/50] commons-rng git commit: Relaxed tolerance of unit test.
Date Mon, 21 Nov 2016 17:04:00 GMT
Relaxed tolerance of unit test.


Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/19695b45
Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/19695b45
Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/19695b45

Branch: refs/heads/master
Commit: 19695b45418392d558b763fa5fea802786e4551e
Parents: bfc8335
Author: Gilles <erans@apache.org>
Authored: Sat Nov 12 19:47:34 2016 +0100
Committer: Gilles <erans@apache.org>
Committed: Sat Nov 12 19:47:34 2016 +0100

----------------------------------------------------------------------
 .../rng/sampling/distribution/DiscreteSamplerParametricTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/19695b45/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
index d96fcb1..21f35ba 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
@@ -83,6 +83,8 @@ public class DiscreteSamplerParametricTest {
     /**
      * Performs a chi-square test of homogeneity of the observed
      * distribution with the expected distribution.
+     * An average failure rate higher than 5% causes the test case
+     * to fail.
      *
      * @param sampler Sampler.
      * @param sampleSize Number of random values to generate.
@@ -129,7 +131,7 @@ public class DiscreteSamplerParametricTest {
             throw new RuntimeException("Unexpected", e);
         }
 
-        if ((double) numFailures / (double) numTests > 0.02) {
+        if ((double) numFailures / (double) numTests > 0.05) {
             Assert.fail(sampler + ": Too many failures for sample size = " + sampleSize +
                         " (" + numFailures + " out of " + numTests + " tests failed, " +
                         "chi2=" + Arrays.toString(failedStat.toArray(new Double[0])));


Mime
View raw message