Do not clear active connections when testing#24599
Closed
maclover7 wants to merge 1 commit into
Closed
Conversation
This was a slight regression when the new ActiveSupport::Executor API was introduced. It isn't great that we now have `@args` as apart of the `complete!` method, but I don't think there is any other way to pass in the current Rack `env` or similar arguments.
Contributor
|
This approach feels like a bandaid, and is taking the comment far too literally. There's a deeper issue at play here that needs to better be addressed. |
sgrif
added a commit
to sgrif/rails
that referenced
this pull request
Apr 18, 2016
This ensures that the "unit of computation" is an entire test, instead of the request. This allows us to skip, for example, connection pooling. This ensures that the same connection is used for the entire test. We should arguably do this for all tests, but this level is the only place that we have an obvious lifecycle to hook into. I think there's still an underlying problem to address, which is that in general we shouldn't release a connection with an open transaction that hasn't been poisoned back into the pool. However, that's a slightly larger change that can be addressed later. Fixes rails#24004 (though this may require an upstream change for RSpec) Fixes rails#23989 Close rails#24491 Close rails#24599
Contributor
Author
|
👍 ok |
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.
This was a slight regression when the new ActiveSupport::Executor API
was introduced. It isn't great that we now have
@argsas apart of thecomplete!method, but I don't think there is any other way to pass inthe current Rack
envor similar arguments.