-
Notifications
You must be signed in to change notification settings - Fork 2.1k
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Memory leak in knex v0.13.0 #2165
Comments
it seems to be the same issue as #2106 |
Thanks for report, would be great to add this kind of test (and fixes ofc) to test suite. |
Can be reproduced as long as |
I've experienced this when using jest specifically myself. I'm wondering if this simply isn't a knex issue, but rather a jest issue. I do not experience equivalent issues in a project using mocha (while completely different projects, the setup is quite similar, both testing API endpoints using supertest/koa2/objection) |
@kiralex if you explicitly call |
I will try.
… @kiralex <https://github.com/kiralex> if you explicitly call
jest.clearAllTimers() in afterEach, does it fix it for you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2165 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC51o8tAsuaF1Qg7RwKy0EWdMSfAZqqtks5sSQYUgaJpZM4OePlm>
.
|
@fl0w nop, it does not fix the issue |
@kiralex Does it leak when running initialization and destroy sequence without jest? |
From my previous tests this should be fixed by #2208, so closing this for now. If it's still an issue in upcoming 0.14, feel free to reopen. |
Hi,
When importing, then destroying, then reset modules a lot of times with jest, I have some warning about memory leak
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGABRT listeners added. Use emitter.setMaxListeners() to increase limit
I think that
destroy()
leave listener that should be removed.Here is the (useless) code to reproduce the issue :
the output :
Is it a bad use or a bug ?
Thanks in advance.
The text was updated successfully, but these errors were encountered: