Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-6121

Dependency injection of @Configurable objects should work across test suites

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.5.6, 3.0.5
    • Fix Version/s: General Backlog
    • Component/s: Test
    • Labels:
      None

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sbrannen Sam Brannen
                Reporter:
                baronludwig Marc Ludwig
                Last updater:
                Juergen Hoeller
              • Votes:
                10 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  2 years, 41 weeks ago