-
Notifications
You must be signed in to change notification settings - Fork 40.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Honor final web application type when creating context in tests
Previously, SpringBootContextLoader would configure its SpringApplication with an ApplicationContextFactory that ignores the WebApplicationType with which its called and instead returns a hard-coded type of context based on the type of the MergedContextConfiguration. This hard-coding would result in the wrong type of context being used if a subsequent change was made to the application's WebApplicationType, for example due to binding of the spring.main.web-application-type configuration property. This commit updates SpringBootContextLoader to configure SpringApplication with an ApplicationContextFactory that takes the WebApplicationType with which it is called into consideration. Fixes gh-29170
- Loading branch information
1 parent
dfc0f21
commit c8de843
Showing
2 changed files
with
64 additions
and
6 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
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