Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to
FaultTolerantStepFactoryBeanRollbackIntegrationTests
, the build pipeline has been intermittently stalling recently. The similar testFaultTolerantStepFactoryBeanIntegrationTests
was disabled in 3758f86b for the same behavior.So far, I couldn't reproduce the problem locally. But the PR offers some minor improvements.
In the Mongo integration tests, the application context and in particular the Mongo client are now closed after each test, respectively. This prevents the Mongo clients from closing on a failed health check during later tests, which is harmless but produces noisy logging during those tests.
I don't have a good hypothesis why the fault-tolerance tests are stalling intermittently. So I don't know whether this PR will resolve the issue. But it implements some concurrency best practices:
ListItemReader
wrapped in aSynchronizedItemReader
.final
and set in the constructorFurthermore, the tests now have a time-out of 30 seconds such that they are cleanly aborted if they should still stall.