-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Honor spring.autoconfigure.exclude in test slices
Previously, the import selector for `@ImportAutoConfiguration` did not consider the spring.autoconfigure.exclude property when determining which auto-configurations to exclude. This meant that tests using a slice that included a particular auto-configuration would include it even if the application's configuration excluded it via spring.autoconfigure.exclude. Confusingly, this could result in a sliced test using an auto-configuration that would be excluded in a broader `@SpringBootTest`. This commit updates the ImportAutoConfigurationImportSelector to consider the spring.autoconfigure.exclude property so that sliced tests will use a subset of the auto-configurations that a `@SpringBootTest` would use. Fixes gh-21736
- Loading branch information
1 parent
1b85ce0
commit 502ccb6
Showing
3 changed files
with
29 additions
and
18 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
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