-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Override SimpleStepBuilder.faultTolerant() in FaultTolerantStepBuilder #3840
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
Conversation
Good catch! Thank you for your PR. This will make the However, could you please add a failing test that passes with this PR? We need to get this covered by a test. Thank you upfront. |
Override SimpleStepBuilder.faultTolerant() in FaultTolerantStepBuilder to prevent creation of a new FaultTolerantStepBuilder when calling faultTolerant() on an existing FaultTolerantStepBuilder. Otherwise configuration, like chunkListeners, are lost.
Hi @benas, thanks for the feedback. I added a test. |
Hey @benas , can you merge this pr please? |
@marbon87 Thank you for updating the PR by adding a test. I planned to merge the fix in the upcoming 4.3.3. |
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.mockito.Mockito.mock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import is not used, I will remove it on merge.
Override SimpleStepBuilder.faultTolerant() in FaultTolerantStepBuilder to prevent creation of a new FaultTolerantStepBuilder when calling faultTolerant() on an existing FaultTolerantStepBuilder. Otherwise configuration, like chunkListeners, are lost. Issue #3840
LGTM. Rebased and merged as a43d3a5. Thank you for your contribution! |
Override SimpleStepBuilder.faultTolerant() in FaultTolerantStepBuilder to prevent creation of a new FaultTolerantStepBuilder when calling faultTolerant() on an existing FaultTolerantStepBuilder. Otherwise configuration, like chunkListeners, are lost. Issue #3840
Override SimpleStepBuilder.faultTolerant() in FaultTolerantStepBuilder to prevent creation of a new FaultTolerantStepBuilder when calling faultTolerant() on an existing FaultTolerantStepBuilder. Otherwise configuration, like chunkListeners, are lost. Issue #3840
I had a failure in a step configuration when calling .faultTolerant() twice. That led to the problem that the chunkListener was not registered.
The reason is that calling .faultTolerant() on an existing FaultTolerantStepBuilder creates a new FaultTolerantStepBuilder but not all configurations, like ChunkListeners, are kept.
Although it was a mistake in my job config, i think it would be better to return the current FaultTolerantStepBuilder to prevent such mistakes.