release_connection after cleaning#122
Merged
etagwerker merged 1 commit intoDatabaseCleaner:mainfrom Jul 30, 2025
Merged
Conversation
2c22251 to
5a23f40
Compare
etagwerker
approved these changes
Jul 7, 2025
Member
etagwerker
left a comment
There was a problem hiding this comment.
@nerdrew Looks good, could you please add an entry to the CHANGELOG.md file?
For Rails >= 7.2, this library gets a connection via `#lease_connection`. But it never releases the connection. Release the connection back to the pool after `#clean`-ing. Rails >= 7.2 does connection health checks / reconnect on connection checkout. If the connection is never checked back into the pool, it will never get "repaired", which makes testing database connection issues tricky.
5a23f40 to
4a16bf4
Compare
Contributor
Author
|
Added a changelog entry. |
etagwerker
approved these changes
Jul 30, 2025
etagwerker
pushed a commit
that referenced
this pull request
Jul 30, 2025
For Rails >= 7.2, this library gets a connection via `#lease_connection`. But it never releases the connection. Release the connection back to the pool after `#clean`-ing. Rails >= 7.2 does connection health checks / reconnect on connection checkout. If the connection is never checked back into the pool, it will never get "repaired", which makes testing database connection issues tricky.
etagwerker
added a commit
that referenced
this pull request
Jul 30, 2025
* Fixes #120 * Add a reference to #121 * Patch test expectation * [Feature][DX] Add Docker Configuration for Development (#109) * Fixes #120 * Add docker configuration for development This makes it easier to run the test suite in your local dev environment * Add a development section for contributors This should make it easier for people to set up the library and run the test suite within Docker * Added ruby service to make it easier to get started with your contribution * Update password to match Docker configuration * Removed outdated docker-compose file * Use older mysql to avoid trilogy error, fix docker compose and instructions, mount code for easier development * Update readme to point to CONTRIBUTE.md file * Run ./bin/setup so that we have the config file in place for tests * Relax dependency * Add a line about the Docker + DX change --------- Co-authored-by: Ariel Juodziukynas <arieljuod@gmail.com> * release_connection after cleaning (#122) For Rails >= 7.2, this library gets a connection via `#lease_connection`. But it never releases the connection. Release the connection back to the pool after `#clean`-ing. Rails >= 7.2 does connection health checks / reconnect on connection checkout. If the connection is never checked back into the pool, it will never get "repaired", which makes testing database connection issues tricky. * Add a reference to #121 * Change expectation to allow for a cascade option --------- Co-authored-by: Ariel Juodziukynas <arieljuod@gmail.com> Co-authored-by: Andrew Lazarus <nerdrew@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For Rails >= 7.2, this library gets a connection via
#lease_connection. But it never releases the connection. Release the connection back to the pool after#clean-ing.Rails >= 7.2 does connection health checks / reconnect on connection checkout. If the connection is never checked back into the pool, it will never get "repaired", which makes testing database connection issues tricky.