From a27097e9ef0544bdc03e5751825f6a3fe75216bc Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Sat, 16 Dec 2017 11:28:15 -0500 Subject: [PATCH] reset defaults --- .../testsuite/forms/BruteForceTest.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java index 4202c95977..020e1e1fc6 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java @@ -81,11 +81,39 @@ public class BruteForceTest extends AbstractTestRealmKeycloakTest { @Before public void config() { + try { + clearUserFailures(); + clearAllUserFailures(); + RealmRepresentation realm = adminClient.realm("test").toRepresentation(); + realm.setFailureFactor(2); + realm.setMaxDeltaTimeSeconds(200); + realm.setMaxFailureWaitSeconds(1000); + realm.setWaitIncrementSeconds(50); + adminClient.realm("test").update(realm); + } catch (Exception e) { + throw new RuntimeException(e); + } + events.clear(); } @After public void slowItDown() throws Exception { + try { + clearUserFailures(); + clearAllUserFailures(); + RealmRepresentation realm = adminClient.realm("test").toRepresentation(); + realm.setMaxFailureWaitSeconds(900); + realm.setMinimumQuickLoginWaitSeconds(60); + realm.setWaitIncrementSeconds(60); + realm.setQuickLoginCheckMilliSeconds(1000L); + realm.setMaxDeltaTimeSeconds(60 * 60 * 12); // 12 hours + realm.setFailureFactor(30); + adminClient.realm("test").update(realm); + } catch (Exception e) { + throw new RuntimeException(e); + } + events.clear(); Thread.sleep(100); }