JSR-352: Add integration tests for Spring Batch

Description

But first, we'll need to get HSEARCH-1316 merged into master, because it changes a lot how Spring ITs are structured. And of course, we'll need to rebase the jsr352 branch onto master. => Done

Activity

Show:

Yoann Rodière November 3, 2017 at 2:18 PM
Edited

I started some work on my branch, and it's not looking good. It's probably not entirely our fault though, since the JSR-352 APIs seem to be quite buggy in Spring Batch. Which I guess is to be expected: it's not their primary API, so it's probably not as thoroughly tested as their native API.

  • I had to work around Spring Batch not supporting references to the partition plan in <chunk item=...>

  • the job is affected by a blocking bug: BATCH-2441

  • there is some other bug I coulnd't identify that prevents us from accessing the job context's transient data from chunk listeners (StepProgressSetupListener in our case)

  • CheckpointAlgorithms in Spring batch seem completely broken (or require some configuration that I didn't understand):

  • Spring Batch will not trigger a checkpoint implicitly when the EntityReader returns null, it will always wait for the CheckpointAlgorithm#isReadyToCheckpoint to return true. And we don't have any information about what EntityReader returned within the checkpoint algorithm... The problem is probably in CheckpointAlgorithmAdapter#isComplete, it should set isComplete to true if result is RepeatStatus.FINISHED.

  • When CheckpointAlgorithm#isReadyToCheckpoint finally returns true, it seems to stop the batch completely without even performing the write!

And I'm sure the list goes on and on... I will stop there for now, because I will probably need to checkout the Spring Batch project and have a look at the JSR-352 tests... and add a few. Which will probably take a lot of time.

Details

Assignee

Reporter

Components

Priority

Created April 24, 2017 at 8:42 AM
Updated September 25, 2023 at 2:48 PM