Skip to content

Dependency injection of @Configurable objects should work across test suites [SPR-6121] #10789

Closed
@spring-projects-issues

Description

@spring-projects-issues

Marc Ludwig opened SPR-6121 and commented

Overview

We have a large number of unit/integration tests that assert behavior within our system and rely upon injection of dependencies into configurable domain objects.

These tests all work when executed individually; however, when executed within a suite (either through the IDE or Ant) certain tests fail as dependencies have not been injected into the @Configurable objects. We have also seen dependencies that were configured for test X being injected into test Y rather than the dependencies for test Y; but I have no test case for this.


Steps to Reproduce

I have created a set of three tests -- tests 1 and 3 are basically identical. If these are executed in a suite the third test will fail as the dependency is not injected into the @Configurable object even though it is available to the test. This only occurs if test 2 is a Spring test.

See attached zip file.


Further Resources


Affects: 2.5.6, 3.0.5

Reference URL: http://forum.springsource.org/showthread.php?t=77980

Attachments:

Issue Links:

11 votes, 14 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    has: votes-jiraIssues migrated from JIRA with more than 10 votes at the time of importin: testIssues in the test moduletype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions