spring-framework/framework-docs/modules/ROOT/pages/testing/annotations
Sam Brannen cd2fbb1ec5 Properly resolve @⁠TestBean factory method within class hierarchy
Prior to this commit, the search algorithm used to locate a @⁠TestBean
factory method within a test class hierarchy incorrectly found factory
methods declared in subclasses or nested test classes "below" the class
in which the @⁠TestBean field was declared. This resulted in "duplicate
bean override" failures for @⁠TestBean overrides which are clearly not
duplicates but rather "overrides of an override".

This commit ensures that @⁠TestBean factory method resolution is
consistent in type hierarchies as well as in enclosing class
hierarchies (for @⁠Nested test classes) by beginning the search for a
factory method in the class which declares the @⁠TestBean field.

Closes gh-34204
2025-01-07 17:20:52 +02:00
..
integration-spring Properly resolve @⁠TestBean factory method within class hierarchy 2025-01-07 17:20:52 +02:00
integration-junit-jupiter.adoc Remove obsolete role attributes for tab groups in the reference manual 2024-09-08 17:20:10 +02:00
integration-junit4.adoc Remove obsolete role attributes for tab groups in the reference manual 2024-09-08 17:20:10 +02:00
integration-meta.adoc Remove obsolete role attributes for tab groups in the reference manual 2024-09-08 17:20:10 +02:00
integration-spring.adoc Polish "Bean Overriding in Tests" support 2024-04-16 17:08:15 +02:00
integration-standard.adoc Fix cross references 2023-05-04 15:35:05 +01:00