Really make poissonConsistencyTest use a fixed seed. Complete intent of r949613.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@955100 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2010-06-16 00:46:05 +00:00
parent 4039a14460
commit e3f28223ad
1 changed files with 4 additions and 2 deletions

View File

@ -237,12 +237,15 @@ public class RandomDataTest extends RetryTestCase {
}
public void testNextPoissonConsistency() throws Exception {
// Reseed randomGenerator to get fixed sequence
randomData.reSeed(1000);
// Small integral means
for (int i = 1; i < 100; i++) {
checkNextPoissonConsistency(i);
}
// non-integer means
RandomData randomData = new RandomDataImpl();
for (int i = 1; i < 10; i++) {
checkNextPoissonConsistency(randomData.nextUniform(1, 1000));
}
@ -268,7 +271,6 @@ public class RandomDataTest extends RetryTestCase {
final int minExpectedCount = 7; // Minimum size of expected bin count
long maxObservedValue = 0;
final double alpha = 0.001; // Probability of false failure
randomData.reSeed(1000); // Reseed randomGenerator to get fixed sequence
Frequency frequency = new Frequency();
for (int i = 0; i < sampleSize; i++) {
long value = randomData.nextPoisson(mean);