Closed
Description
Dimitrios Liapis opened BATCH-2767 and commented
While working on the PR for BATCH-2752 I found out that SynchronizedItemStreamReaderTests and SynchronizedItemStreamReaderBuilderTests have the following issue:
The test threads are not properly started but rather their run method gets invoked
I've addressed this issue and also performed some refactoring.
Few points about the approach followed:
- using an atomic integer to track access to the read method
- using a CountDownLatch to get all the threads ready
- using assertion within the read method (closely paired with the atomic integer above)
Referenced from: pull request #666