diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2016-11-04 12:03:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-04 12:03:53 -0700 |
commit | a432e6dba44f1aba465d0fefcd65233cd6b8599e (patch) | |
tree | 8dc95c2ab7f22cc4bad2b5c322536ee38134a71c | |
parent | af34d2f2907d1b4a71b5f76714a5caabe9d53405 (diff) | |
parent | 2646c1021adb181b96395afc92b143e115ff113f (diff) | |
download | rails-a432e6dba44f1aba465d0fefcd65233cd6b8599e.tar.gz rails-a432e6dba44f1aba465d0fefcd65233cd6b8599e.tar.bz2 rails-a432e6dba44f1aba465d0fefcd65233cd6b8599e.zip |
Merge pull request #26967 from headius/bad_threading_test
Use different name for main and thread connection variable.
-rw-r--r-- | activerecord/test/cases/connection_pool_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb index d7ff9d6880..3844f1eca2 100644 --- a/activerecord/test/cases/connection_pool_test.rb +++ b/activerecord/test/cases/connection_pool_test.rb @@ -184,14 +184,14 @@ module ActiveRecord 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 |