Remove WebClient's in-memory buffer size limit for endpoint tests

Previously, the endpoints' responses could occasionally exceed
WebClient's in-memory buffer limt, for example if the threads endpoint
was reporting a large number of threads or the threads had large
stacks.

This commit disables WebClient's in-memory buffer size limit so that
the tests passing is not dependent on the size of the endpoints'
responses.

Closes gh-22743
pull/23053/head
Andy Wilkinson 4 years ago
parent 2238b0d797
commit 71ffb44a3c

@ -166,7 +166,7 @@ class WebMvcEndpointExposureIntegrationTests {
int port = context.getSourceApplicationContext(ServletWebServerApplicationContext.class).getWebServer()
.getPort();
ExchangeStrategies exchangeStrategies = ExchangeStrategies.builder()
.codecs((configurer) -> configurer.defaultCodecs().maxInMemorySize(512 * 1024)).build();
.codecs((configurer) -> configurer.defaultCodecs().maxInMemorySize(-1)).build();
return WebTestClient.bindToServer().baseUrl("http://localhost:" + port).exchangeStrategies(exchangeStrategies)
.build();
}

Loading…
Cancel
Save