diff --git a/API/src/main/java/me/braydon/mc/common/EnvironmentUtils.java b/API/src/main/java/me/braydon/mc/common/EnvironmentUtils.java index 6d53ee6..7f8812f 100644 --- a/API/src/main/java/me/braydon/mc/common/EnvironmentUtils.java +++ b/API/src/main/java/me/braydon/mc/common/EnvironmentUtils.java @@ -43,15 +43,11 @@ public final class EnvironmentUtils { static { // Are we running on production? - String env = System.getenv("APP_ENV"); - production = env != null && (env.equals("production")); + String appEnv = System.getenv("APP_ENV"); + production = appEnv != null && (appEnv.equals("production")); - // Are we running in a test? - try { - Class.forName("org.junit.jupiter.engine.JupiterTestEngine"); - testing = true; - } catch (ClassNotFoundException ignored) { - // Safely ignore - } + // Are we running on a test environment? + String testEnv = System.getenv("SPRING_TEST"); + testing = testEnv != null && (testEnv.equals("true")); } } \ No newline at end of file