GH-11268: Suppress RestTemplate removal warnings - #11270
Conversation
cppwfs
left a comment
There was a problem hiding this comment.
Thank you so much for your contributions! Its off to a great start!
| */ | ||
| @SpringJUnitConfig | ||
| @DirtiesContext | ||
| @SuppressWarnings("removal") |
There was a problem hiding this comment.
Per the issue we don't want to suppress the warnings but rather replace RestTemplate with RestClient in the tests.
There was a problem hiding this comment.
yep, dropped the test suppress and switched those to RestClient
| handler.setBeanFactory(TEST_INTEGRATION_CONTEXT); | ||
| } | ||
|
|
||
| @SuppressWarnings("removal") |
| */ | ||
| @SpringJUnitConfig | ||
| @DirtiesContext | ||
| @SuppressWarnings("removal") |
There was a problem hiding this comment.
Per the issue we don't want to suppress the warnings but rather replace RestTemplate with RestClient in the tests.
| */ | ||
| @SpringJUnitConfig | ||
| @DirtiesContext | ||
| @SuppressWarnings("removal") |
artembilan
left a comment
There was a problem hiding this comment.
Right.
The RestTemplate is not our class to test around.
We would like to move to a replacement API as soon as possible.
Therefore, our tests must be fixed right now to prove that new API is good and have coverage for new API instead of the one out of support already.
And teach your AI agent that ./gradlew :spring-integration-http:check task is for everything what it iterates separately.
Thanks
Fixes: spring-projects#11268 Keep @SuppressWarnings("removal") on remaining RestTemplate-based HTTP outbound APIs until that client is removed. Move HTTP outbound tests onto RestClient instead of suppressing the old client in tests. Signed-off-by: Burak KALAYCI <kalayciburak1996@gmail.com>
ef80593 to
7690f06
Compare
Add
@SuppressWarnings("removal")on remaining RestTemplate-based HTTP outbound APIs until they are removed.Verification
./gradlew :spring-integration-http:checkFixes: gh-11268