KEYCLOAK-10355 Avoid LastSessionRefreshUnitTest to trigger scheduled tasks
This commit is contained in:
parent
b5d8f70cc7
commit
5b40691deb
1 changed files with 14 additions and 0 deletions
|
@ -24,6 +24,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import org.infinispan.Cache;
|
||||
import org.jboss.arquillian.container.test.api.Deployment;
|
||||
import org.jboss.shrinkwrap.api.spec.WebArchive;
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.keycloak.admin.client.resource.UserResource;
|
||||
|
@ -40,6 +41,7 @@ import org.keycloak.testsuite.AbstractKeycloakTest;
|
|||
import org.keycloak.common.util.Retry;
|
||||
import org.keycloak.testsuite.runonserver.RunOnServer;
|
||||
import org.keycloak.testsuite.runonserver.RunOnServerDeployment;
|
||||
import org.keycloak.timer.TimerProvider;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
|
||||
|
@ -59,6 +61,18 @@ public class LastSessionRefreshUnitTest extends AbstractKeycloakTest {
|
|||
}
|
||||
|
||||
|
||||
@After
|
||||
public void cleanupPeriodicTask() {
|
||||
// Cleanup unneeded periodic task, which was added during this test
|
||||
testingClient.server().run((session -> {
|
||||
|
||||
TimerProvider timer = session.getProvider(TimerProvider.class);
|
||||
timer.cancelTask(CrossDCLastSessionRefreshStoreFactory.LSR_PERIODIC_TASK_NAME);
|
||||
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testLastSessionRefreshCounters() {
|
||||
testingClient.server().run(new LastSessionRefreshServerCounterTest());
|
||||
|
|
Loading…
Reference in a new issue