-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Using queue.process during test prevent jest from exiting #2244
Labels
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I got it too |
me too :( |
same here |
I think BullMQ supports Jest now, but unless somebody provides a PR with a fix for Bull this issue will most likely remain unresolved. |
Any update on this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
If
queue.process
appears at least once in the code executed during the tests, then jest does not exit one second after the test run has completed.If i put
await
in front ofqueue.process(...)
, nothing happens. The code blocks on this instruction until Jest raises error for time expire.I've tried several solutions, but none seems to work:
queue.close()
queue.process
with/without async, promises or done callbackqueue.clean()
queue.obliterate()
--detectOpenHandles
-> with this option jest never exits at allEvery queue event callback (like
closed
,cleaned
,drained
, ...) is correctly fired. Jobs are correctly executed. Everything with Bull seems to work fine. The only problem is withqueue.process(...)
method.Minimal, Working Test code to reproduce the issue.
(An easy to reproduce test case will dramatically decrease the resolution time.)
Bull version
^4.2.0
Additional information
NodeJs Version: 14.18.1
Jest Version: ^27.4.5
The text was updated successfully, but these errors were encountered: