Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The test datasource should not be autowired in JobRepositoryTestUtils #4178

Closed
fmbenhassine opened this issue Aug 21, 2022 · 0 comments
Closed

Comments

@fmbenhassine
Copy link
Contributor

fmbenhassine commented Aug 21, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant