mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +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
|
||||
void ensureNoErrors() {
|
||||
verifyNoInteractions(errorLogger);
|
||||
SessionCache.clear();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -20,6 +20,7 @@ import com.djrapitops.plan.gathering.cache.SessionCache;
|
||||
import com.djrapitops.plan.gathering.domain.ActiveSession;
|
||||
import com.djrapitops.plan.settings.config.PlanConfig;
|
||||
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.Test;
|
||||
import org.mockito.Mockito;
|
||||
@ -48,6 +49,11 @@ class AFKTrackerTest {
|
||||
underTest = new AFKTracker(config);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void tearDown() {
|
||||
SessionCache.clear();
|
||||
}
|
||||
|
||||
@Test
|
||||
void afkThresholdMatches() {
|
||||
assertEquals(afkThreshold, underTest.getAfkThreshold());
|
||||
|
@ -61,6 +61,7 @@ class NukkitAFKListenerTest {
|
||||
@AfterEach
|
||||
void ensureNoErrors() {
|
||||
verifyNoInteractions(errorLogger);
|
||||
SessionCache.clear();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user