mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-07 04:18:26 +02:00
Disabled systems after all database tests
This commit is contained in:
parent
ae5a1df7cd
commit
cd33f6bc32
@ -17,6 +17,7 @@
|
||||
package com.djrapitops.plan.db;
|
||||
|
||||
import com.djrapitops.plan.system.PlanSystem;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.jupiter.api.io.TempDir;
|
||||
@ -52,6 +53,12 @@ public class H2Test implements DatabaseTest {
|
||||
.orElseThrow(IllegalStateException::new);
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
static void disableSystem() {
|
||||
if (database != null) database.close();
|
||||
system.disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Database db() {
|
||||
return database;
|
||||
|
@ -20,6 +20,7 @@ import com.djrapitops.plan.data.container.GeoInfo;
|
||||
import com.djrapitops.plan.db.access.queries.ServerAggregateQueries;
|
||||
import com.djrapitops.plan.db.access.transactions.events.PlayerRegisterTransaction;
|
||||
import com.djrapitops.plan.system.PlanSystem;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.Assumptions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@ -65,6 +66,12 @@ class MySQLTest implements DatabaseTest {
|
||||
database = mysql.get();
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
static void disableSystem() {
|
||||
if (database != null) database.close();
|
||||
system.disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Database db() {
|
||||
return database;
|
||||
|
@ -23,6 +23,7 @@ import com.djrapitops.plan.db.access.transactions.StoreServerInformationTransact
|
||||
import com.djrapitops.plan.db.access.transactions.events.PlayerRegisterTransaction;
|
||||
import com.djrapitops.plan.system.PlanSystem;
|
||||
import com.djrapitops.plan.system.info.server.Server;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
@ -62,6 +63,12 @@ public class SQLiteTest implements DatabaseTest {
|
||||
.orElseThrow(IllegalStateException::new);
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
static void disableSystem() {
|
||||
if (database != null) database.close();
|
||||
system.disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Database db() {
|
||||
return database;
|
||||
|
Loading…
Reference in New Issue
Block a user