Skip to content
Permalink
Browse files
Disable tests in JMH module.
Add a better fixed seed with a note on how to test samplers using a
random seed.
  • Loading branch information
aherbert committed Aug 27, 2021
1 parent f97188b commit 8c98e6583323f5860d73f94e03c14cf52eb8e2f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
@@ -76,6 +76,11 @@
<project.mainClass>org.openjdk.jmh.Main</project.mainClass>
<!-- Disable analysis for benchmarking code. -->
<pmd.skip>true</pmd.skip>

<!-- Skip tests. This avoids the lengthy test of the ziggurat samplers. Override using:
mvn test -DskipTests=false
-->
<skipTests>true</skipTests>
</properties>

<profiles>
@@ -46,8 +46,14 @@ class ZigguratSamplerTest {
*
* <p>This has been chosen to allow the test to pass with all generators.
* Set to null test with a random seed.
*
* <p>Note that the p-value of the chi-square test is 0.001. There are multiple assertions
* per test and multiple samplers. The total number of chi-square tests is above 100
* and failure of a chosen random seed on a few tests is common. When using a random
* seed re-run the test multiple times. Systematic failure of the same sampler
* should be investigated further.
*/
private static final Long SEED = 0L;
private static final Long SEED = 0xd1342543de82ef95L;

/**
* Create arguments with the name of the factory.

0 comments on commit 8c98e65

Please sign in to comment.