Skip to content

Do not clear active connections when testing#24599

Closed
maclover7 wants to merge 1 commit into
rails:masterfrom
maclover7:jm-cleanup-6
Closed

Do not clear active connections when testing#24599
maclover7 wants to merge 1 commit into
rails:masterfrom
maclover7:jm-cleanup-6

Conversation

@maclover7

Copy link
Copy Markdown
Contributor

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.

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.
@sgrif

sgrif commented Apr 18, 2016

Copy link
Copy Markdown
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 sgrif closed this Apr 18, 2016
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
@maclover7 maclover7 deleted the jm-cleanup-6 branch April 18, 2016 20:13
@maclover7

Copy link
Copy Markdown
Contributor Author

👍 ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants