Skip to content
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

Jest warning on leaks if tests fail by timeout #73

Open
wawaqa opened this issue May 6, 2022 · 2 comments
Open

Jest warning on leaks if tests fail by timeout #73

wawaqa opened this issue May 6, 2022 · 2 comments
Labels
Priority: low Type: bug Something isn't working

Comments

@wawaqa
Copy link

wawaqa commented May 6, 2022

Although this is not a critical issue, I'd suggest to have a look into it when we have time to improve the product.
If Jest tests fails by timeout, the following warning is displayed:
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
Steps to reproduce:

  1. Set low timeout (e.g. 30 secs) in Jest
  2. Run tests with scans
    image

Relates to #74

@derevnjuk derevnjuk added Priority: low Type: bug Something isn't working labels May 8, 2022
@derevnjuk
Copy link
Member

You have to align scan's timeout with jest's timeout. Otherwise, nothing prevents the async generator to execute new iterations.

@wawaqa
Copy link
Author

wawaqa commented May 9, 2022

maybe we should at least mention it in the documentation? of for instance pass jest timeout to the threshold if it's present by default?
The problem is also that we leave lots of scans, which either get disrupted or running forever (like the LFI one, I have scans running 2+ days old, although usually it takes minutes to finish).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: low Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants