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 detect open handles in tests after upgrading from 8.9.6 to 8.10.0 #15241

Open
2 tasks done
Freezystem opened this issue Feb 7, 2025 · 0 comments
Open
2 tasks done

Comments

@Freezystem
Copy link
Contributor

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Mongoose version

8.10.0

Node.js version

20

MongoDB server version

6.0.20

Typescript version (if applicable)

No response

Description

Jest detects open handles after upgrading from 8.9.6 to 8.10.0.
Here are some logs:

Jest has detected the following 14 open handles potentially keeping Jest from exiting:

...

at node_modules/mongoose/lib/connection.js:838:19
at NativeConnection._waitForConnect (node_modules/mongoose/lib/connection.js:837:7)
at _createCollection (node_modules/mongoose/lib/model.js:1106:16)
at Function.init (node_modules/mongoose/lib/model.js:1119:16)
at Mongoose._model (node_modules/mongoose/lib/mongoose.js:667:9)
at Mongoose.model (node_modules/mongoose/lib/mongoose.js:622:27)
...

My code hasn't changed it was just a mongoose dependency upgrade. When I rollback the upgrade everything works fine again.

Steps to Reproduce

upgrade from 8.9.6 to 8.10.0. Run tests that use jest and mongoose connections.

Expected Behavior

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant