Commit b08e51f0 authored by Phillip Webb's avatar Phillip Webb

Increase WebClient testing timeout

parent 69a1eebf
......@@ -16,6 +16,7 @@
package org.springframework.boot.actuate.endpoint.web;
import java.time.Duration;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
......@@ -62,6 +63,8 @@ import static org.mockito.Mockito.verify;
*/
public abstract class AbstractWebEndpointIntegrationTests<T extends ConfigurableApplicationContext> {
private static final Duration TIMEOUT = Duration.ofSeconds(30);
private final Class<?> exporterConfiguration;
protected AbstractWebEndpointIntegrationTests(Class<?> exporterConfiguration) {
......@@ -311,11 +314,9 @@ public abstract class AbstractWebEndpointIntegrationTests<T extends Configurable
"test", Collections.singletonMap("endpointPath", endpointPath)));
context.refresh();
try {
consumer.accept(context,
WebTestClient.bindToServer()
.baseUrl(
"http://localhost:" + getPort(context) + endpointPath)
.build());
String url = "http://localhost:" + getPort(context) + endpointPath;
consumer.accept(context, WebTestClient.bindToServer().baseUrl(url)
.responseTimeout(TIMEOUT).build());
}
finally {
context.close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment