Closed
Description
Chris Hansen opened SPR-10635 and commented
Setup:
- JUnit 4.11
- Surefire 2.14.1 with
<parallel>methods</parallel>
or<parallel>both</parallel>
- Spring 3.2.3.RELEASE
- log4j 1.2.17
- log4j.properties contains
log4j.logger.org.springframework.test.context.support.DependencyInjectionTestExecutionListener=DEBUG
- log4j.properties contains
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:
- Allow for concurrent test execution in the TestContext framework [SPR-5863] #10532 Allow for concurrent test execution in the TestContext framework ("duplicates")