Commit 71ffb44a authored by Andy Wilkinson's avatar Andy Wilkinson

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
parent 2238b0d7
......@@ -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();
}
......
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