-
Notifications
You must be signed in to change notification settings - Fork 40.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TestRestTemplate request factory management
This commit fixes two issues in `TestRestTemplate`: * it improves the detection of the underlying request factory, using reflection to look inside the intercepting request factory if interceptors were configured * it avoids reusing the same request factory when creating a new `TestRestTemplate` with `withBasicAuth`. Sharing the same instance would result in sharing authentication state (HTTP cookies). Since the original request factory can't be detected consistently, a new one is selected automatically See gh-8697
- Loading branch information
Showing
1 changed file
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters