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

Polish integration tests #4741

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hpoettker
Copy link
Contributor

Due to FaultTolerantStepFactoryBeanRollbackIntegrationTests, the build pipeline has been intermittently stalling recently. The similar test FaultTolerantStepFactoryBeanIntegrationTests 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:

  • the readers have been replaced by the battle tested ListItemReader wrapped in a SynchronizedItemReader.
  • unused fields in the processors and writers have been removed
  • fields in the processors and writers are now either constant or thread-safe collections
  • fields in the processors and writers are now final and set in the constructor

Furthermore, the tests now have a time-out of 30 seconds such that they are cleanly aborted if they should still stall.

In the Mongo integration tests, the application context and in particular the Mongo client are now closed after each test, respectively.

Thread-safety of the fault-tolerance integration steps is improved as they are intermittingly stalling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant