forked from StarOpenSource/Engine
Fix MiscellaneousTest engine crash
This commit is contained in:
parent
3c09713867
commit
2d61b027b3
1 changed files with 1 additions and 14 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue