This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 3bcec552c7e900287bd7124457a0f413c2bb51f5 Author: Martin Desruisseaux <[email protected]> AuthorDate: Tue Jan 28 10:44:32 2020 +0100 Use a fixed seed for avoiding a random (even if rare) test failure. --- .../java/org/apache/sis/referencing/GeodeticCalculatorTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticCalculatorTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticCalculatorTest.java index 2d9ae74..a6be0e5 100644 --- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticCalculatorTest.java +++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticCalculatorTest.java @@ -329,7 +329,13 @@ public strictfp class GeodeticCalculatorTest extends TestCase { */ @Test public void testBetweenRandomPoints() { - final Random random = TestUtilities.createRandomNumberGenerator(); + /* + * Use a fixed seed for avoiding random test failures. Those failures are rare and when they + * happen the error compared to reference implementation is small, so we could just increase + * the tolerance instead. But we want to make the build stable in a more reliable way. Use a + * different seed for this class and the GeodesicsOnEllipsoidTest subclass. + */ + final Random random = TestUtilities.createRandomNumberGenerator(getClass().getName().hashCode() ^ -9027446642343254278L); final GeodeticCalculator c = create(false); final Geodesic reference = createReferenceImplementation(c); Statistics[] errors = null;
