Fix flaky spring batch test
@@ -8,7 +8,7 @@ package springbatch
import org.springframework.batch.item.ItemWriter
class TestItemWriter implements ItemWriter<Integer> {
- final List<Integer> items = new ArrayList()
+ final List<Integer> items = Collections.synchronizedList(new ArrayList())
@Override
void write(List<? extends Integer> items) throws Exception {
