Change timeouts.

This commit is contained in:
Olga Maciaszek-Sharma
2024-12-06 16:59:47 +01:00
parent 0298ab0d86
commit 18b0f85013

View File

@@ -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<Tags, Long> 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())