mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-06 15:44:49 +08:00
[Fix] Tests fail when server is running
This commit is contained in:
parent
633f5ba98a
commit
04c831b9b3
@ -25,6 +25,7 @@ import com.djrapitops.plan.system.database.databases.sql.SQLDB;
|
||||
import com.djrapitops.plan.system.database.databases.sql.SQLiteDB;
|
||||
import com.djrapitops.plan.system.database.databases.sql.tables.*;
|
||||
import com.djrapitops.plan.system.info.server.Server;
|
||||
import com.djrapitops.plan.system.settings.Settings;
|
||||
import com.djrapitops.plan.utilities.Base64Util;
|
||||
import com.djrapitops.plan.utilities.SHA256Hash;
|
||||
import org.junit.*;
|
||||
@ -77,6 +78,7 @@ public class SQLiteTest {
|
||||
.withServer();
|
||||
PlanBukkitComponent component = DaggerPlanBukkitComponent.builder().plan(mockUtil.getPlanMock()).build();
|
||||
system = component.system();
|
||||
system.getConfigSystem().getConfig().set(Settings.WEBSERVER_PORT, 9005);
|
||||
system.enable();
|
||||
|
||||
dbSystem = system.getDatabaseSystem();
|
||||
|
@ -4,6 +4,7 @@ import com.djrapitops.plan.DaggerPlanBukkitComponent;
|
||||
import com.djrapitops.plan.PlanBukkitComponent;
|
||||
import com.djrapitops.plan.api.exceptions.EnableException;
|
||||
import com.djrapitops.plan.system.PlanSystem;
|
||||
import com.djrapitops.plan.system.settings.Settings;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.ClassRule;
|
||||
@ -35,6 +36,7 @@ public class NetworkSettingsTest {
|
||||
@Test
|
||||
public void transferDoesNotProduceException() throws EnableException {
|
||||
PlanSystem system = COMPONENT.system();
|
||||
system.getConfigSystem().getConfig().set(Settings.WEBSERVER_PORT, 9005);
|
||||
system.enable();
|
||||
|
||||
NetworkSettings networkSettings = system.getConfigSystem().getConfig().getNetworkSettings();
|
||||
|
Loading…
Reference in New Issue
Block a user