From e126969f8277713d43d560205e473e6142ca91c5 Mon Sep 17 00:00:00 2001 From: Alfredo Boullosa Date: Wed, 10 Mar 2021 11:33:19 +0100 Subject: [PATCH] Add Retry --- .../DisableAuthorizationSettingsTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authorization/DisableAuthorizationSettingsTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authorization/DisableAuthorizationSettingsTest.java index 3ecc710c8a..402c226dcc 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authorization/DisableAuthorizationSettingsTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authorization/DisableAuthorizationSettingsTest.java @@ -16,11 +16,12 @@ */ package org.keycloak.testsuite.console.authorization; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertFalse; import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; import org.junit.Test; +import org.keycloak.common.util.Retry; /** * @author Pedro Igor @@ -34,11 +35,14 @@ public class DisableAuthorizationSettingsTest extends AbstractAuthorizationSetti clientSettingsPage.navigateTo(); clientSettingsPage.form().setAuthorizationSettingsEnabled(false); waitUntilElement(modalDialog.getMessage()).text().contains(WARNING_MESSAGE); + clientSettingsPage.form().confirmDisableAuthorizationSettings(); - Thread.sleep(1000); - clientSettingsPage.form().save(); + Retry.execute(() -> { + clientSettingsPage.form().save(); + }, 10, 300); + clientSettingsPage.form().confirmDisableAuthorizationSettings(); - assertAlertSuccess(); + Retry.execute(this::assertAlertSuccess, 10, 300); clientSettingsPage.navigateTo(); assertFalse(clientSettingsPage.form().isAuthorizationSettingsEnabled());