You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When @Primary support was added for spring-test in 677a321, the lookup was added before TransactionManagementConfigurer lookup and not after as it should have been, given that TransactionManagementConfigurer should take higher precedence. In fact maybe it should be the first check even before the beansOfTypeIncludingAncestors lookup as the configurer can construct a TransactionManager that is not a registered bean (a registered bean could be in the context that is not the one that the configurer will return).
Steps to reproduce
Configure a context with a @Primary TransactionManager and a TransactionManagementConfigurer.
Current result
Test uses the @Primary annotated bean.
Expected result
Test should use the bean provided by TransactionManagementConfigurer.