Increase WebClient testing timeout
This commit is contained in:
parent
69a1eebf68
commit
b08e51f0b3
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.endpoint.web;
|
package org.springframework.boot.actuate.endpoint.web;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -62,6 +63,8 @@ import static org.mockito.Mockito.verify;
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractWebEndpointIntegrationTests<T extends ConfigurableApplicationContext> {
|
public abstract class AbstractWebEndpointIntegrationTests<T extends ConfigurableApplicationContext> {
|
||||||
|
|
||||||
|
private static final Duration TIMEOUT = Duration.ofSeconds(30);
|
||||||
|
|
||||||
private final Class<?> exporterConfiguration;
|
private final Class<?> exporterConfiguration;
|
||||||
|
|
||||||
protected AbstractWebEndpointIntegrationTests(Class<?> exporterConfiguration) {
|
protected AbstractWebEndpointIntegrationTests(Class<?> exporterConfiguration) {
|
||||||
|
|
@ -311,11 +314,9 @@ public abstract class AbstractWebEndpointIntegrationTests<T extends Configurable
|
||||||
"test", Collections.singletonMap("endpointPath", endpointPath)));
|
"test", Collections.singletonMap("endpointPath", endpointPath)));
|
||||||
context.refresh();
|
context.refresh();
|
||||||
try {
|
try {
|
||||||
consumer.accept(context,
|
String url = "http://localhost:" + getPort(context) + endpointPath;
|
||||||
WebTestClient.bindToServer()
|
consumer.accept(context, WebTestClient.bindToServer().baseUrl(url)
|
||||||
.baseUrl(
|
.responseTimeout(TIMEOUT).build());
|
||||||
"http://localhost:" + getPort(context) + endpointPath)
|
|
||||||
.build());
|
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
context.close();
|
context.close();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue