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
{{ message }}
Repository navigation
Debug logging for DependencyInjectionTestExecutionListener breaks injection for parallel tests [SPR-10635] #15263
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.
Activity
spring-projects-issues commentedon Jun 9, 2013
Sam Brannen commented
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.
spring-projects-issues commentedon Jun 9, 2013
Sam Brannen commented
This issue is essentially a duplicate of #10532.
spring-projects-issues commentedon Jun 10, 2013
Chris Hansen commented
That makes perfect sense. Thanks for looking into it!