Adjusting wait time

This commit is contained in:
Ryan Baxter
2021-09-21 19:44:09 -04:00
parent c19c95c925
commit b01f4fd44c

View File

@@ -19,6 +19,7 @@ package org.springframework.cloud.kubernetes.client.loadbalancer.it;
import java.io.IOException;
import java.time.Duration;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.ApiException;
@@ -142,7 +143,7 @@ public class LoadBalancerIT {
});
// Sometimes the NGINX ingress takes a bit to catch up and realize the service is
// available and we get a 503, we just need to wait a bit
await().atLeast(Duration.ofSeconds(300))
await().pollInterval(Duration.ofSeconds(1)).atMost(600, TimeUnit.SECONDS)
.until(() -> rest.getForEntity("http://localhost:80/loadbalancer-it/servicea", String.class)
.getStatusCode().is2xxSuccessful());
Map<String, Object> result = rest.getForObject("http://localhost:80/loadbalancer-it/servicea", Map.class);