-
Notifications
You must be signed in to change notification settings - Fork 445
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
Add unit test for each queue jobs class #9899
Comments
…obs\doi\DepositContext
…d PKP\jobs\bulk\BulkEmailSender along with mockery package version update
…omSearchIndexJob and PKP\jobs\submissions\RemoveSubmissionFileFromSearchIndexJob
…obs\doi\DepositContext
…d PKP\jobs\bulk\BulkEmailSender along with mockery package version update
…omSearchIndexJob and PKP\jobs\submissions\RemoveSubmissionFileFromSearchIndexJob
@asmecher Thanks for the confirmation . I have rebased but I can not merge it as it's for stable |
* #9899 job unit tests patch fix * #9899 Updated StatisticsReportNotifyTest to have app specific serialized data * #9899 Updated StatisticsReportNotifyTest to have OPS specific serialized data * #9899 job mocking for submission deposition test * #9899 updated mock class implementation for doi registration * #9899 Added test skipping for OMP * #9899 unused class import cleanup * #9899 removed direct mocking of job class * #9899 fixed PHPUnit deprecation warning * #9899 notification mocks added * #9899 added backup/restore for dao and container keys * #9899 fixed usage stats file create/update issue for tests
@touhidurabir, all merged -- I think this is ready for closing! |
@asmecher I think we still have same issue . No unit tests for job is running . I can see that the PR pkp/pkp-github-actions#69 is merged and see the changes in main branch . However when tests are running via githnb action , for the unit test, command as follow /home/runner/work/omp/omp/pkp-github-actions/.github/actions/run-unit-tests.sh -CcPpd the @withanage any idea why the updated command not being used when running unit tests via github actions ? |
Hi @touhidurabir , Sorry, I missed the PR there. After merge, we have to release a new |
@withanage Thanks a lot for releasing a new version . Now all unit tests are running . |
Describe the problem
Starting from
3.4.0
we have queue jobs to handle long running tasks or for tasks that need to done later . Our queue jobs implementation is an extended implementation of Laravel queue jobs.The problem arise or will arise when any of the jobs structure will update but there is one or more pending jobs with older structure already dispatched in queue waiting to get executed . This problem get more complex with the upgrade of newer version when older structure based job still in queue as they may continue to fail and no way to resolve it after upgrade which may lead to undesirable outcome.
Describe the proposal
The initial plan was to force to run all pending queue jobs before upgrade which proposed at Add pre-flight check for pending jobs before running upgrade . This was a very simple and easy approach but may not suited for all possible cases . Also a job class structure or handle implementation may need to update based on requirement.
After some detailed discussion, we decided to add unit tests for each job class to make sure the consistence update the job class structure and handle method implementation . The idea is to try to mock each of jobs class to make sure it's on even after any update to it.
Impacted version
OJS, OMP or OPS version 3.4.0 and main
Additional information
Details discussion at Right approach to handle pending queue jobs at upgrade
Job classes to have unit tests
Stable-3.4.0
OJS
OMP
OPS
PKP-LIB
PRs (Merged)
pkp-lib --> #9981
ojs --> pkp/ojs#4285
omp --> pkp/omp#1666
ops --> pkp/ops#745
PR Patch
pkp-lib --> #10368
ojs --> pkp/ojs#4426
ops --> pkp/ops#763
omp --> pkp/omp#1693
Need to merge the PR for issue pkp/pkp-github-actions#68
The text was updated successfully, but these errors were encountered: