mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-06 15:44:49 +08:00
Teardown session cache after use in AFKTracker tests
This commit is contained in:
parent
229cb18d86
commit
2ad3b20f36
@ -61,6 +61,7 @@ class BukkitAFKListenerTest {
|
|||||||
@AfterEach
|
@AfterEach
|
||||||
void ensureNoErrors() {
|
void ensureNoErrors() {
|
||||||
verifyNoInteractions(errorLogger);
|
verifyNoInteractions(errorLogger);
|
||||||
|
SessionCache.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -20,6 +20,7 @@ import com.djrapitops.plan.gathering.cache.SessionCache;
|
|||||||
import com.djrapitops.plan.gathering.domain.ActiveSession;
|
import com.djrapitops.plan.gathering.domain.ActiveSession;
|
||||||
import com.djrapitops.plan.settings.config.PlanConfig;
|
import com.djrapitops.plan.settings.config.PlanConfig;
|
||||||
import com.djrapitops.plan.settings.config.paths.TimeSettings;
|
import com.djrapitops.plan.settings.config.paths.TimeSettings;
|
||||||
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.mockito.Mockito;
|
import org.mockito.Mockito;
|
||||||
@ -48,6 +49,11 @@ class AFKTrackerTest {
|
|||||||
underTest = new AFKTracker(config);
|
underTest = new AFKTracker(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterEach
|
||||||
|
void tearDown() {
|
||||||
|
SessionCache.clear();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void afkThresholdMatches() {
|
void afkThresholdMatches() {
|
||||||
assertEquals(afkThreshold, underTest.getAfkThreshold());
|
assertEquals(afkThreshold, underTest.getAfkThreshold());
|
||||||
|
@ -61,6 +61,7 @@ class NukkitAFKListenerTest {
|
|||||||
@AfterEach
|
@AfterEach
|
||||||
void ensureNoErrors() {
|
void ensureNoErrors() {
|
||||||
verifyNoInteractions(errorLogger);
|
verifyNoInteractions(errorLogger);
|
||||||
|
SessionCache.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user