Fix test failure by using the new cloneBuilder method
The cloneBuilder helps to avoid the issue in the comment of the ticket. Rather than creating the WebClient to then obtain a fresh builder which causes connector instantiation, we now use the cloneBuilder Issue: SPR-15674
This commit is contained in:
@@ -146,7 +146,7 @@ class DefaultWebTestClientBuilder implements WebTestClient.Builder {
|
||||
new HttpHandlerConnector(this.httpHandlerBuilder.build()));
|
||||
|
||||
DefaultWebTestClientBuilder webTestClientBuilder = new DefaultWebTestClientBuilder(
|
||||
this.webClientBuilder.build().mutate(), this.httpHandlerBuilder,
|
||||
this.webClientBuilder.cloneBuilder(), this.httpHandlerBuilder,
|
||||
this.connector, this.responseTimeout);
|
||||
|
||||
return new DefaultWebTestClient(this.webClientBuilder,
|
||||
|
||||
Reference in New Issue
Block a user