This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/master by this push:
     new 4eb29a8ebd Allowing more time to GitHub runners to refresh WA during 
tests (#558)
4eb29a8ebd is described below

commit 4eb29a8ebdc506ddaaaf61eb8f159791fb34c3f2
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Mon Nov 27 14:36:26 2023 +0100

    Allowing more time to GitHub runners to refresh WA during tests (#558)
---
 .../src/test/java/org/apache/syncope/fit/AbstractITCase.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/fit/wa-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java 
b/fit/wa-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
index 8d12f1d54c..016026baf3 100644
--- a/fit/wa-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
+++ b/fit/wa-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
@@ -116,39 +116,39 @@ public abstract class AbstractITCase {
     public static void waitForWARefresh() {
         SAML2IdPEntityService samlIdPEntityService = 
ADMIN_CLIENT.getService(SAML2IdPEntityService.class);
 
-        await().atMost(60, TimeUnit.SECONDS).pollInterval(20, 
TimeUnit.SECONDS).until(() -> {
+        await().atMost(120, TimeUnit.SECONDS).pollInterval(20, 
TimeUnit.SECONDS).until(() -> {
             boolean refreshed = false;
             try {
                 String metadata = WebClient.create(
                         WA_ADDRESS + 
"/idp/metadata").get().readEntity(String.class);
                 if (metadata.contains("localhost:8080")) {
-                    
WA_CONFIG_SERVICE.pushToWA(WAConfigService.PushSubject.conf, List.of());
                     throw new IllegalStateException();
                 }
                 metadata = WebClient.create(
                         WA_ADDRESS + "/oidc/" + 
OidcConstants.WELL_KNOWN_OPENID_CONFIGURATION_URL).
                         get().readEntity(String.class);
                 if (metadata.contains("localhost:8080")) {
-                    
WA_CONFIG_SERVICE.pushToWA(WAConfigService.PushSubject.conf, List.of());
                     throw new IllegalStateException();
                 }
                 metadata = WebClient.create(
                         WA_ADDRESS + "/actuator/registeredServices", 
ANONYMOUS_USER, ANONYMOUS_KEY, null).
                         get().readEntity(String.class);
                 if (metadata.contains("localhost:8080/syncope-wa")) {
-                    
WA_CONFIG_SERVICE.pushToWA(WAConfigService.PushSubject.conf, List.of());
                     throw new IllegalStateException();
                 }
                 metadata = WebClient.create(
                         WA_ADDRESS + "/actuator/authenticationHandlers", 
ANONYMOUS_USER, ANONYMOUS_KEY, null).
                         get().readEntity(String.class);
                 if (!metadata.contains("DefaultLDAPAuthModule")) {
-                    
WA_CONFIG_SERVICE.pushToWA(WAConfigService.PushSubject.conf, List.of());
                     throw new IllegalStateException();
                 }
 
                 samlIdPEntityService.get(SAML2IdPEntityService.DEFAULT_OWNER);
                 refreshed = true;
+            } catch (IllegalStateException e) {
+                WebClient.create(
+                        WA_ADDRESS + "/actuator/refresh", ANONYMOUS_USER, 
ANONYMOUS_KEY, null).
+                        post(null);
             } catch (Exception e) {
                 // ignore
             }

Reply via email to