-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Description
Overview
The internal buildMergedContextConfiguration() method in AbstractTestContextBootstrapper originally resolved the ApplicationContextInitializer set only once. However, the changes made in conjunction with #18528 (see commit 2244461) introduced a regression resulting in the initializers being resolved twice: once for validation and once for actually building the merged context configuration. In addition, the resolution for validation does not honor the inheritInitializers flag in ContextConfigurationAttributes.
We should therefore restore the original behavior where initializers are resolved correctly once via ApplicationContextInitializerUtils.resolveInitializerClasses().
Although this is technically a regression, I am labeling this as an enhancement, since the improper validation does not seem to have caused issues in real projects (or at least no one has reported it).