spring-batch
spring-batch copied to clipboard
[BATCH-2767] Fixing and refactoring SynchronizedItemStreamReaderTests
along with its builder test class SynchronizedItemStreamReaderBuilderTests
Hi @dimitrisli , thank you for this PR!
Before addressing your changes, I was looking at the current test of the synchronized reader, and I feel like it's testing the synchronized
modifier of Java. I really trust the JVM here on synchronizing access to the read
method and I wouldn't bother starting multiple threads and making sure only one of them is calling the method at a time..
We had a similar discussion on the synchronized writer side on which we agreed, so could you please update this PR similarly to what we did for the writer? Please do not hesitate to update the year in license headers as well. Thank you upfront!
Hi @dimitrisli ,
Did you get a chance to check my previous comment? If you can't update the PR, let me know if you agree and I will take care of the changes.
Thank you.
Rebased, squashed and merged as f0787454f875d6b71869ba69d023d2d731206139. I also refactored the test as mentioned in my previous comments.
Thank you for your contribution!