KEYCLOAK-3381 Fix and stabilize some Console UI tests
This commit is contained in:
parent
a9ccabdce5
commit
0147fbe489
2 changed files with 10 additions and 10 deletions
|
@ -77,10 +77,10 @@ public class PasswordPolicy extends Authentication {
|
|||
|
||||
public enum Type {
|
||||
|
||||
HASH_ITERATIONS("HashIterations"), LENGTH("Length"), DIGITS("Digits"), LOWER_CASE("LowerCase"),
|
||||
UPPER_CASE("UpperCase"), SPECIAL_CHARS("SpecialChars"), NOT_USERNAME("NotUsername"),
|
||||
REGEX_PATTERN("RegexPattern"), PASSWORD_HISTORY("PasswordHistory"),
|
||||
FORCE_EXPIRED_PASSWORD_CHANGE("ForceExpiredPasswordChange");
|
||||
HASH_ITERATIONS("Hashing Iterations"), LENGTH("Minimum Length"), DIGITS("Digits"), LOWER_CASE("Lowercase Characters"),
|
||||
UPPER_CASE("Uppercase Characters"), SPECIAL_CHARS("Special Characters"), NOT_USERNAME("Not Username"),
|
||||
REGEX_PATTERN("Regular Expression"), PASSWORD_HISTORY("Not Recently Used"),
|
||||
FORCE_EXPIRED_PASSWORD_CHANGE("Expire Password"), HASH_ALGORITHM("Hashing Algorithm");
|
||||
|
||||
private String name;
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public class SecurityDefensesTest extends AbstractRealmTest {
|
|||
|
||||
@Test
|
||||
public void maxLoginFailuresTest() throws InterruptedException {
|
||||
final short secondsToWait = 3;
|
||||
final short secondsToWait = 10; // For slower browsers/webdrivers (like IE) we need higher value
|
||||
final short maxLoginFailures = 2;
|
||||
|
||||
bruteForceDetectionPage.form().setProtectionEnabled(true);
|
||||
|
@ -89,7 +89,7 @@ public class SecurityDefensesTest extends AbstractRealmTest {
|
|||
|
||||
@Test
|
||||
public void quickLoginCheck() throws InterruptedException {
|
||||
final short secondsToWait = 3;
|
||||
final short secondsToWait = 10;
|
||||
|
||||
bruteForceDetectionPage.form().setProtectionEnabled(true);
|
||||
bruteForceDetectionPage.form().setMaxLoginFailures("100");
|
||||
|
@ -104,7 +104,7 @@ public class SecurityDefensesTest extends AbstractRealmTest {
|
|||
|
||||
@Test
|
||||
public void maxWaitLoginFailures() throws InterruptedException {
|
||||
final short secondsToWait = 5;
|
||||
final short secondsToWait = 15;
|
||||
|
||||
bruteForceDetectionPage.form().setProtectionEnabled(true);
|
||||
bruteForceDetectionPage.form().setMaxLoginFailures("1");
|
||||
|
@ -120,7 +120,7 @@ public class SecurityDefensesTest extends AbstractRealmTest {
|
|||
@Test
|
||||
public void failureResetTime() throws InterruptedException {
|
||||
final short failureResetTime = 3;
|
||||
final short waitIncrement = 3;
|
||||
final short waitIncrement = 5;
|
||||
|
||||
bruteForceDetectionPage.form().setProtectionEnabled(true);
|
||||
bruteForceDetectionPage.form().setMaxLoginFailures("1");
|
||||
|
@ -199,8 +199,8 @@ public class SecurityDefensesTest extends AbstractRealmTest {
|
|||
|
||||
wait *= 1000;
|
||||
|
||||
log.debug("Wait: " + wait);
|
||||
Thread.sleep(wait);
|
||||
log.info("Wait: " + wait);
|
||||
pause(wait);
|
||||
|
||||
if (finalLogin) {
|
||||
testRealmLoginPage.form().login(testUser);
|
||||
|
|
Loading…
Reference in a new issue