[16][queue_job] JobsTrap perform_enqueued_jobs not working with jobs creating new jobs
fdegrave opened this issue · comments
François Degrave commented
Module
queue_job testing utilities
Describe the bug
After a call to perform_enqueued_jobs the enqueued_jobs is empty, even if one of the jobs created new jobs.
To Reproduce
Affected versions: tested on 16
Steps to reproduce the behavior:
- Create a job that creates new jobs
- Within a job trap context, create such a job then execute it using trap.perform_enqueued_jobs
- trap.enqueued_jobs is empty, but the newly created jobs appear in trap.calls
Expected behavior
trap.enqueued_jobs contains the newly created jobs
Note: this is an easy fix, I already tested it. This bug report is for reference in the PR I'll create shortly.