Ensure the WebClient to be present before enabling the WebTestClientContextCustomizer#24152
Ensure the WebClient to be present before enabling the WebTestClientContextCustomizer#24152gesellix wants to merge 1 commit into
Conversation
|
Please leave a note if you'd like to have a test case for the change. |
|
Thanks very much for the pull request, @gesellix. A test for this would be great if you have the time. It should be possible to test it using |
eb9ee3f to
4c60562
Compare
|
@wilkinsona thanks for the hints about |
| @@ -0,0 +1,55 @@ | |||
| /* | |||
| * Copyright 2012-2019 the original author or authors. | |||
There was a problem hiding this comment.
Not sure, if there's a policy about changing the copyright notice to ...-2020, but I guess that could be adjusted for the whole code base :)
There was a problem hiding this comment.
We change the date whenever the file is updated. This should be 2020 but don't worry we'll take care of that when merging.
This commit reinstanties the isWeBClientPresent() check so that WebTestClientContextCustomizer is only added if a web client is available. See gh-24152
|
@gesellix thank you for the report and the PR. |
|
You're welcome, thanks for merging! :) |
Our
@SpringBootTestin aSERVLETSpringApplication fails with the stacktrace below after an upgrade from Spring-Boot 2.3.6 to 2.4.0.It seems like a check on the presence of
WebClienthad been removed with the refactoring at 6b437ec#diff-0468685a60929025a2cf3fe3ed6a01021f7b6865d562536897e5915c3a483c40L42.This pull request adds the check for
isWebClientPresent().stacktrace