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
With the above setup, dependency injection works on one method, yet fails on another (same test class, separate test class instances). If you comment out log4j.logger.org.springframework.test.context.support.DependencyInjectionTestExecutionListener=DEBUG from log4j.properties, it works. This behavior is VERY consistent for me.
Thanks for creating the project on GitHub. That made it easy to try out your scenario!
However, having experimented with your example, it turns out that logging is not the cause of the problem. Instead, concurrent execution of tests in the TestContext framework is a more general problem which will be addressed in #10532.
FYI: turning on debug logging simply increases the chance that the test in your example fails, but if you run the test multiple times without debug logging enabled then the test will still fail sporadically depending on the current CPU load on your machine.
Chris Hansen opened SPR-10635 and commented
Setup:
<parallel>methods</parallel>
or<parallel>both</parallel>
log4j.logger.org.springframework.test.context.support.DependencyInjectionTestExecutionListener=DEBUG
With the above setup, dependency injection works on one method, yet fails on another (same test class, separate test class instances). If you comment out
log4j.logger.org.springframework.test.context.support.DependencyInjectionTestExecutionListener=DEBUG
from log4j.properties, it works. This behavior is VERY consistent for me.Minimal failing example project: https://github.com/hansenc/parallel-injection-bug
Affects: 3.2.3
Reference URL: https://github.com/hansenc/parallel-injection-bug
Issue Links:
The text was updated successfully, but these errors were encountered: