Skip to content

The test datasource should not be autowired in JobRepositoryTestUtils #4178

Closed
@fmbenhassine

Description

@fmbenhassine

Using @SpringBatchTest with a test context that contains more than one datasource bean fails at startup. The reason is that @SpringBatchTest tries to register a JobRepositoryTestUtils bean in the test context, which in turn tries to autowire a datasource (but multiple are found in this case).

The autowiring of the datasource in JobRepositoryTestUtils should be removed to avoid this kind of issues.

Similar to #1237
Related to #3767

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions