[
https://issues.apache.org/jira/browse/FINERACT-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098504#comment-17098504
]
Petri Tuomola commented on FINERACT-922:
----------------------------------------
Hi - yes, that's exactly what I observed with this particular test on my
machine:
The test called executeJob() to trigger the job and then retrieved the job
status. But this happened so quickly that Quartz had not yet started the job.
Hence currentlyRunning was false when the SchedulerJobHelper checked for job
status.
When currentlyRunning is false, SchedulerJobHelper assumes the job has
completed and retrieves the job history. But in this case the job history was
empty as the job had not even been started - which then resulted in a failed
assertion (and failed the test).
So in this case, waiting a few seconds before retrieving the job status fixed
the test. Alternatively, as I mentioned in the earlier comment, the logic in
SchedulerJobHelper could be enhanced to recognise this scenario and deal with
it accordingly.
And yes, I'm not sure how many other test failures are due to this (if any) - I
only observed this issue for this particular test.
> Improve SchedulerJobHelper to be more reliable and prevent flaky tests
> ----------------------------------------------------------------------
>
> Key: FINERACT-922
> URL: https://issues.apache.org/jira/browse/FINERACT-922
> Project: Apache Fineract
> Issue Type: Improvement
> Reporter: Michael Vorburger
> Priority: Critical
>
> [~ptuomola] pointed out in FINERACT-855 that the reason for at least some of
> our often Randomly Failing Integration Tests in FINERACT-850 is likely that
> the SchedulerJobHelper has serious issues.
> Improving that helper presumably will help for a number of flaky tests.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)