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

Use different name for main and thread connection variable. #26967

Merged
merged 1 commit into from
Nov 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions activerecord/test/cases/connection_pool_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ def test_active_connection?

def test_checkout_behaviour
pool = ConnectionPool.new ActiveRecord::Base.connection_pool.spec
connection = pool.connection
assert_not_nil connection
main_connection = pool.connection
assert_not_nil main_connection
threads = []
4.times do |i|
threads << Thread.new(i) do
connection = pool.connection
assert_not_nil connection
connection.close
thread_connection = pool.connection
assert_not_nil thread_connection
thread_connection.close
end
end

Expand Down