You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2023/04/27 09:45:38 UTC

[commons-rng] branch master updated: Changed fixed seed RNG for random seed RNG in repeated tests

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git


The following commit(s) were added to refs/heads/master by this push:
     new c48bc7ee Changed fixed seed RNG for random seed RNG in repeated tests
c48bc7ee is described below

commit c48bc7ee6faeee5cad86f601b8fdbdded15d9da1
Author: aherbert <ah...@apache.org>
AuthorDate: Thu Apr 27 10:45:24 2023 +0100

    Changed fixed seed RNG for random seed RNG in repeated tests
---
 .../test/java/org/apache/commons/rng/sampling/ArraySamplerTest.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ArraySamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ArraySamplerTest.java
index c0884b9e..12c25c02 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ArraySamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ArraySamplerTest.java
@@ -241,7 +241,7 @@ class ArraySamplerTest {
     @ValueSource(ints = {13, 16})
     void testShuffleIsRandom(int length) {
         final int[] array = PermutationSampler.natural(length);
-        final UniformRandomProvider rng = RandomAssert.seededRNG();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final long[][] counts = new long[length][length];
         for (int j = 1; j <= 1000; j++) {
             ArraySampler.shuffle(rng, array);
@@ -263,7 +263,7 @@ class ArraySamplerTest {
     void testShuffleSubRangeIsRandom(int from, int to, int length) {
         // Natural sequence in the sub-range
         final int[] array = natural(from, to, length);
-        final UniformRandomProvider rng = RandomAssert.seededRNG();
+        final UniformRandomProvider rng = RandomAssert.createRNG();
         final int n = to - from;
         final long[][] counts = new long[n][n];
         for (int j = 1; j <= 1000; j++) {