From 18b0f85013556e6dc46bb5ac974aaf3454374634 Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Fri, 6 Dec 2024 16:59:47 +0100 Subject: [PATCH] Change timeouts. --- .../EurekaInstanceMonitorWithCustomTagsProviderTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaInstanceMonitorWithCustomTagsProviderTests.java b/spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaInstanceMonitorWithCustomTagsProviderTests.java index 3feabec88..3e6a00885 100644 --- a/spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaInstanceMonitorWithCustomTagsProviderTests.java +++ b/spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/EurekaInstanceMonitorWithCustomTagsProviderTests.java @@ -32,6 +32,7 @@ import org.springframework.cloud.netflix.eureka.server.metrics.EurekaInstanceTag import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; @@ -89,7 +90,8 @@ class EurekaInstanceMonitorWithCustomTagsProviderTests { } private void assertEurekaInstance(Map meterRegistryCounts) { - await().atMost(10, SECONDS) + await().pollDelay(5, MILLISECONDS) + .atMost(6, SECONDS) .pollInterval(fibonacci()) .untilAsserted(() -> meterRegistryCounts.forEach((tags, count) -> assertThat((long) meterRegistry.get("eureka.server.instances").tags(tags).gauge().value())