From 2d61b027b39c747b9ba0b762f4263fd7ff02ba33 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 29 Jul 2024 21:21:38 +0200 Subject: [PATCH] Fix MiscellaneousTest engine crash --- .../base/srctests/utility/MiscellaneousTest.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/base/src/test/java/de/staropensource/sosengine/base/srctests/utility/MiscellaneousTest.java b/base/src/test/java/de/staropensource/sosengine/base/srctests/utility/MiscellaneousTest.java index 46d5631..a6c9d28 100644 --- a/base/src/test/java/de/staropensource/sosengine/base/srctests/utility/MiscellaneousTest.java +++ b/base/src/test/java/de/staropensource/sosengine/base/srctests/utility/MiscellaneousTest.java @@ -22,12 +22,10 @@ package de.staropensource.sosengine.base.srctests.utility; import de.staropensource.sosengine.base.EngineConfiguration; import de.staropensource.sosengine.base.annotations.EventListener; import de.staropensource.sosengine.base.events.ThrowableCatchEvent; -import de.staropensource.sosengine.base.reflection.Reflect; import de.staropensource.sosengine.base.srctests.TestBase; import de.staropensource.sosengine.base.utility.Math; import de.staropensource.sosengine.base.utility.Miscellaneous; import org.jetbrains.annotations.NotNull; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -52,15 +50,6 @@ public class MiscellaneousTest extends TestBase { */ private static boolean throwableCaught; - /** - * Sets the {@link EngineConfiguration}#{@code instance} to {@code null} after each test. - */ - @AfterEach - void clearConfiguration() throws Exception { - // For method testExecuteSafely1() - Reflect.reflectOn(EngineConfiguration.class).getMethod("clearInstance").invoke(); - } - /** * Tests the method {@code padNumbers}. */ @@ -148,9 +137,7 @@ public class MiscellaneousTest extends TestBase { throwableCaught = false; - // Initialize EngineConfiguration to avoid NullPointerException - // and disable event optimization for instant results - new EngineConfiguration(); + // Disable event optimization for instant results Properties properties = new Properties(); properties.setProperty("sosengine.base.debug", "true"); properties.setProperty("sosengine.base.debugEvents", "true");