mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 19:47:49 +01:00
Fixed test flakiness caused by Settings finality.
This commit is contained in:
parent
dfb5f39918
commit
a78060acf9
@ -7,10 +7,7 @@ package com.djrapitops.plan.system;
|
||||
import com.djrapitops.plan.Plan;
|
||||
import com.djrapitops.plan.api.exceptions.EnableException;
|
||||
import com.djrapitops.plan.system.settings.Settings;
|
||||
import org.junit.After;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
import org.junit.*;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
@ -41,6 +38,11 @@ public class BukkitSystemTest {
|
||||
planMock = mockUtil.getPlanMock();
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
Teardown.resetSettingsTempValues();
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
if (bukkitSystem != null) {
|
||||
|
@ -27,7 +27,7 @@ import java.util.UUID;
|
||||
/**
|
||||
* @author Rsl1122
|
||||
*/
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
@RunWith(MockitoJUnitRunner.Silent.class)
|
||||
public class BungeeBukkitConnectionTest {
|
||||
|
||||
@ClassRule
|
||||
@ -65,6 +65,7 @@ public class BungeeBukkitConnectionTest {
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
Teardown.resetSettingsTempValues();
|
||||
Settings.DEBUG.setTemporaryValue("console");
|
||||
Settings.DEV_MODE.setTemporaryValue(true);
|
||||
}
|
||||
|
@ -42,6 +42,12 @@ public class BungeeSystemTest {
|
||||
planMock = mockUtil.getPlanMock();
|
||||
}
|
||||
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
Teardown.resetSettingsTempValues();
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() {
|
||||
if (bungeeSystem != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user