KEYCLOAK-6007 Fix failing integration Node.js adapter test

This commit is contained in:
vmuzikar 2017-12-08 15:46:17 +01:00
parent 00fb36437d
commit 874dbcb3e1

View file

@ -22,6 +22,7 @@ import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.keycloak.models.utils.SessionTimeoutHelper;
import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.testsuite.AbstractAuthTest; import org.keycloak.testsuite.AbstractAuthTest;
import org.keycloak.testsuite.adapter.nodejs.page.NodejsExamplePage; import org.keycloak.testsuite.adapter.nodejs.page.NodejsExamplePage;
@ -140,7 +141,7 @@ public class NodejsAdapterTest extends AbstractAuthTest {
// test SSO timeout // test SSO timeout
pause(ssoTimeout * 1000); pause((ssoTimeout + SessionTimeoutHelper.IDLE_TIMEOUT_WINDOW_SECONDS) * 1000);
nodejsExamplePage.clickLogin(); nodejsExamplePage.clickLogin();
assertCurrentUrlStartsWithLoginUrlOf(testRealmLoginPage); // there should be an attempt for token refresh assertCurrentUrlStartsWithLoginUrlOf(testRealmLoginPage); // there should be an attempt for token refresh
// but SSO session should be already expired // but SSO session should be already expired