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

Removed db.close() #12025

Closed
wants to merge 1 commit into from
Closed

Removed db.close() #12025

wants to merge 1 commit into from

Conversation

Biki-das
Copy link
Contributor

@Biki-das Biki-das commented Nov 3, 2021

removed db.close() because it's is not defined. "close()" is not a function of an instance of Db class from the official MongoDB driver API.

@codecov-commenter
Copy link

Codecov Report

Merging #12025 (e03aff8) into main (10d9580) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #12025   +/-   ##
=======================================
  Coverage   68.77%   68.77%           
=======================================
  Files         324      324           
  Lines       16669    16669           
  Branches     4813     4813           
=======================================
  Hits        11464    11464           
  Misses       5172     5172           
  Partials       33       33           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10d9580...e03aff8. Read the comment docs.

@Biki-das
Copy link
Contributor Author

Biki-das commented Nov 3, 2021

@SimenB we should be inline with the mongodb docs i think> expect your feedback here

@SimenB
Copy link
Member

SimenB commented Nov 3, 2021

@mrazauskas
Copy link
Contributor

Might be db.close() is simply redundant, because connection.close() is closing everything. Code in the examples folder does not include db.close(): https://github.com/facebook/jest/blob/9301c73c53675f912b724025de2480b65a9d276e/examples/mongodb/__test__/db.test.js#L6-L16

Current example in documentation is missing useUnifiedTopology: true. Not sure what it does, but it might be good idea to keep docs and the example in sync. Simply because the examples folder is part of Jest’s test suite and all examples there definitely work as expected.

By the way, there are few more stale PRs suggesting to remove db.close()#8333, #11531, #11635. If this one lands, these could be closed too.

@Biki-das Biki-das closed this Feb 4, 2022
@github-actions
Copy link

github-actions bot commented Mar 7, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants