Merge pull request #2393 from mhajas/mellon-timeout-PR

KEYCLOAK-2688 Modified session length in mod_auth_mellon test
This commit is contained in:
Stian Thorgersen 2016-03-21 15:21:00 +01:00
commit 3b7101650e

View file

@ -56,7 +56,7 @@ public class ModAuthMellonTest extends AbstractAuthTest {
modAuthMellonProtectedResourcePage2.navigateTo(); modAuthMellonProtectedResourcePage2.navigateTo();
URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage); URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage);
pause(2000); //session length pause(5000); //session length
modAuthMellonProtectedResourcePage.navigateTo(); modAuthMellonProtectedResourcePage.navigateTo();
URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage); URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage);
@ -76,15 +76,11 @@ public class ModAuthMellonTest extends AbstractAuthTest {
@Test @Test
public void sessionExpiration() { public void sessionExpiration() {
RealmRepresentation realm = testRealmResource().toRepresentation();
realm.setSsoSessionIdleTimeout(2);
testRealmResource().update(realm);
modAuthMellonProtectedResourcePage.navigateTo(); modAuthMellonProtectedResourcePage.navigateTo();
testRealmSAMLRedirectLoginPage.form().login(bburkeUser); testRealmSAMLRedirectLoginPage.form().login(bburkeUser);
assertTrue(driver.getPageSource().contains("Protected resource")); assertTrue(driver.getPageSource().contains("Protected resource"));
pause(2000); //session length pause(5000); //session length
modAuthMellonProtectedResourcePage.navigateTo(); modAuthMellonProtectedResourcePage.navigateTo();
URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage); URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage);