Browse Source

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
pull/1462/merge
Rossen Stoyanchev 9 years ago
parent
commit
12850c5fc4
  1. 2
      spring-test/src/main/java/org/springframework/test/web/reactive/server/DefaultWebTestClientBuilder.java

2
spring-test/src/main/java/org/springframework/test/web/reactive/server/DefaultWebTestClientBuilder.java

@ -146,7 +146,7 @@ class DefaultWebTestClientBuilder implements WebTestClient.Builder { @@ -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,

Loading…
Cancel
Save