-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
StepExecution.getEndTime() returns null in StepExecutionListener.afterStep() #3846
Comments
is there any update on this bug. I am also facing same issue. |
Thank you for opening this issue. I agree, I see listeners as pre/post processing injection points, and not part of the actual job/step execution itself. A typical example for such listeners is timing a job or step, which is impossible if the end time is This will be a minor breaking change, so I will plan it for one of the upcoming minor versions. |
can I take this issue? |
@Kyoungwoong Sure. Thank you for your offer to help! |
Resolves spring-projects#3846 Signed-off-by: Fabrice Bibonne <[email protected]>
Bug description
StepExecution.getEndTime() invoked inside StepExecutionListener.afterStep() returns null.
It should return a valid time, according to the API docs which says below:
I already checked the similar isssue, #2710, but the comments in that issue do not seem to be consistent with the API docs.
Environment
Java version: AdoptOpenJDK 11
Spring Batch version: 4.3.1
Spring Boot version: 2.4.2
Steps to reproduce
Download and execute this spring boot application: https://github.com/HomoEfficio/scratchpad-spring-batch
The console result is like below:
Expected behavior
StepExecution.getEndTime() invoked inside StepExecutionListener.afterStep() should return a valid time instead of null.
Minimal Complete Reproducible example
https://github.com/HomoEfficio/scratchpad-spring-batch
The text was updated successfully, but these errors were encountered: