Teardown session cache after use in AFKTracker tests

This commit is contained in:
Risto Lahtela 2022-02-05 09:47:43 +02:00
parent 229cb18d86
commit 2ad3b20f36
3 changed files with 8 additions and 0 deletions

View File

@ -61,6 +61,7 @@ class BukkitAFKListenerTest {
@AfterEach
void ensureNoErrors() {
verifyNoInteractions(errorLogger);
SessionCache.clear();
}
@Test

View File

@ -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());

View File

@ -61,6 +61,7 @@ class NukkitAFKListenerTest {
@AfterEach
void ensureNoErrors() {
verifyNoInteractions(errorLogger);
SessionCache.clear();
}
@Test