OCA / queue

Asynchronous Job Queue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[16][queue_job] JobsTrap perform_enqueued_jobs not working with jobs creating new jobs

fdegrave opened this issue · comments

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:

  1. Create a job that creates new jobs
  2. Within a job trap context, create such a job then execute it using trap.perform_enqueued_jobs
  3. 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.