Skip to content

Debug logging for DependencyInjectionTestExecutionListener breaks injection for parallel tests [SPR-10635] #15263

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

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:

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulestatus: duplicateA duplicate of another issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions