From 5ad66e91518686279dde2903630d39abc4d9eba0 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Sun, 1 Jan 2023 14:22:47 +0100 Subject: [PATCH] Increase error margin --- .../test/net/sf/openrocket/simulation/FlightEventsTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/test/net/sf/openrocket/simulation/FlightEventsTest.java b/core/test/net/sf/openrocket/simulation/FlightEventsTest.java index 4aa1df57f..1069d67f5 100644 --- a/core/test/net/sf/openrocket/simulation/FlightEventsTest.java +++ b/core/test/net/sf/openrocket/simulation/FlightEventsTest.java @@ -24,6 +24,8 @@ import static org.junit.Assert.assertSame; * Tests to verify that simulations contain all the expected flight events. */ public class FlightEventsTest extends BaseTestCase { + private static final double EPSILON = 0.005; + /** * Tests for a single stage design. */ @@ -66,7 +68,7 @@ public class FlightEventsTest extends BaseTestCase { // Test that the event times are correct for (int i = 0; i < expectedEventTimes.length; i++) { assertEquals(" Flight type " + expectedEventTypes[i] + " has wrong time", - expectedEventTimes[i], eventList.get(i).getTime(), 0.002); + expectedEventTimes[i], eventList.get(i).getTime(), EPSILON); } @@ -142,7 +144,7 @@ public class FlightEventsTest extends BaseTestCase { // Test that the event times are correct for (int i = 0; i < expectedEventTimes.length; i++) { assertEquals(" Flight type " + expectedEventTypes[i] + " has wrong time", - expectedEventTimes[i], eventList.get(i).getTime(), 0.002); + expectedEventTimes[i], eventList.get(i).getTime(), EPSILON); } // Test that the event sources are correct