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 6f459ae6b9 WA integration tests: relax checks waiting for refresh
6f459ae6b9 is described below

commit 6f459ae6b90095617142572f7d66cadc4511dc62
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Thu May 4 08:47:41 2023 +0200

    WA integration tests: relax checks waiting for refresh
---
 fit/wa-reference/src/main/resources/wa-embedded.properties     |  1 +
 .../src/test/java/org/apache/syncope/fit/AbstractITCase.java   | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/fit/wa-reference/src/main/resources/wa-embedded.properties 
b/fit/wa-reference/src/main/resources/wa-embedded.properties
index 641378b141..baf6dccb7c 100644
--- a/fit/wa-reference/src/main/resources/wa-embedded.properties
+++ b/fit/wa-reference/src/main/resources/wa-embedded.properties
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 spring.main.allow-circular-references=true
+spring.cloud.refresh.never-refreshable=com.zaxxer.hikari.HikariDataSource,org.apereo.cas.configuration.model.core.CasServerProperties
 
 keymaster.address=https://localhost:9443/syncope/rest/keymaster
 keymaster.username=${anonymousUser}
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 7e332773b5..2de353057f 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
@@ -114,7 +114,7 @@ public abstract class AbstractITCase {
     public static void waitForWARefresh() {
         SAML2IdPEntityService samlIdPEntityService = 
ADMIN_CLIENT.getService(SAML2IdPEntityService.class);
 
-        await().atMost(50, TimeUnit.SECONDS).pollInterval(5, 
TimeUnit.SECONDS).until(() -> {
+        await().atMost(60, TimeUnit.SECONDS).pollInterval(20, 
TimeUnit.SECONDS).until(() -> {
             boolean refreshed = false;
             try {
                 String metadata = IOUtils.readInputStreamToString(
@@ -133,6 +133,14 @@ public abstract class AbstractITCase {
                     
WA_CONFIG_SERVICE.pushToWA(WAConfigService.PushSubject.conf, List.of());
                     throw new IllegalStateException();
                 }
+                metadata = IOUtils.readInputStreamToString(
+                        (InputStream) WebClient.create(
+                                WA_ADDRESS + "/actuator/registeredServices", 
"anonymous", "anonymousKey", null).
+                                get().getEntity(), StandardCharsets.UTF_8);
+                if (metadata.contains("localhost:8080/syncope-wa")) {
+                    
WA_CONFIG_SERVICE.pushToWA(WAConfigService.PushSubject.conf, List.of());
+                    throw new IllegalStateException();
+                }
 
                 samlIdPEntityService.get(SAML2IdPEntityService.DEFAULT_OWNER);
                 refreshed = true;

Reply via email to