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
OptimisticLockingFailureTests.testAsyncStopOfStartingJob fails intermittently [BATCH-2482] #1121
Milestone
Comments
Andy Wilkinson commented This is failing with 3.0.7 too:
|
spring-projects-issues
added
in: build
type: bug
status: waiting-for-triage
Issues that we did not analyse yet
in: core
labels
Dec 16, 2019
fmbenhassine
added
type: task
and removed
in: core
status: waiting-for-triage
Issues that we did not analyse yet
type: bug
labels
Nov 17, 2020
fmbenhassine
added a commit
to fmbenhassine/spring-batch
that referenced
this issue
Nov 17, 2020
This test was failing intermittently due to an incorrect way of waiting for a job execution to finish, which is: ``` while(jobExecution.isRunning()) { // wait for async launched job to complete execution } ``` `JobExecution#isRunning()` is based on the status of the job execution in memory which might not be persisted yet. Here is an excerpt from the Javadoc: ``` Test if this JobExecution indicates that it is running. It should be noted that this does not necessarily mean that it has been persisted as such yet. ``` That's why in the case where `isRunning` returns false and the JobExecution is not persisted yet (which is still in a running status in db), the second attempt of re-running the job fails with a `JobExecutionAlreadyRunningException`. This commit fixes the loop by continuously checking the status of the Job execution in the job repository until it reaches one of the end statuses. Issue spring-projects#1121
fmbenhassine
added a commit
that referenced
this issue
Nov 18, 2020
This test was failing intermittently due to an incorrect way of waiting for a job execution to finish, which is: ``` while(jobExecution.isRunning()) { // wait for async launched job to complete execution } ``` `JobExecution#isRunning()` is based on the status of the job execution in memory which might not be persisted yet. Here is an excerpt from the Javadoc: ``` Test if this JobExecution indicates that it is running. It should be noted that this does not necessarily mean that it has been persisted as such yet. ``` That's why in the case where `isRunning` returns false and the JobExecution is not persisted yet (which is still in a running status in db), the second attempt of re-running the job fails with a `JobExecutionAlreadyRunningException`. This commit fixes the loop by continuously checking the status of the Job execution in the job repository until it reaches one of the end statuses. Issue #1121
Fixed in cf26422. |
fmbenhassine
added a commit
that referenced
this issue
Feb 18, 2021
This test was failing intermittently due to an incorrect way of waiting for a job execution to finish, which is: ``` while(jobExecution.isRunning()) { // wait for async launched job to complete execution } ``` `JobExecution#isRunning()` is based on the status of the job execution in memory which might not be persisted yet. Here is an excerpt from the Javadoc: ``` Test if this JobExecution indicates that it is running. It should be noted that this does not necessarily mean that it has been persisted as such yet. ``` That's why in the case where `isRunning` returns false and the JobExecution is not persisted yet (which is still in a running status in db), the second attempt of re-running the job fails with a `JobExecutionAlreadyRunningException`. This commit fixes the loop by continuously checking the status of the Job execution in the job repository until it reaches one of the end statuses. Issue #1121 (cherry picked from commit cf26422)
fmbenhassine
added a commit
that referenced
this issue
Feb 18, 2021
This test was failing intermittently due to an incorrect way of waiting for a job execution to finish, which is: ``` while(jobExecution.isRunning()) { // wait for async launched job to complete execution } ``` `JobExecution#isRunning()` is based on the status of the job execution in memory which might not be persisted yet. Here is an excerpt from the Javadoc: ``` Test if this JobExecution indicates that it is running. It should be noted that this does not necessarily mean that it has been persisted as such yet. ``` That's why in the case where `isRunning` returns false and the JobExecution is not persisted yet (which is still in a running status in db), the second attempt of re-running the job fails with a `JobExecutionAlreadyRunningException`. This commit fixes the loop by continuously checking the status of the Job execution in the job repository until it reaches one of the end statuses. Issue #1121 (cherry picked from commit cf26422)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Andy Wilkinson opened BATCH-2482 and commented
Affects: 3.0.6, 3.0.7
Reference URL: https://build.spring.io/browse/PLATFORM-COM-JOB1-68/test/case/185750414
The text was updated successfully, but these errors were encountered: