mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
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
This commit is contained in:
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…
Reference in New Issue
Block a user