aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorthedarkone <thedarkone2@gmail.com>2015-04-04 22:33:32 +0200
committerthedarkone <thedarkone2@gmail.com>2015-05-14 02:25:57 +0200
commita3923e667ca2c78734665389be964aa8492cfe1c (patch)
tree2208fc621f40a2829ae0d73eb482afd0c4e26ef6 /activerecord/test/cases
parent2c7c11d545dff93d91af4555d3babea813ccd3b3 (diff)
downloadrails-a3923e667ca2c78734665389be964aa8492cfe1c.tar.gz
rails-a3923e667ca2c78734665389be964aa8492cfe1c.tar.bz2
rails-a3923e667ca2c78734665389be964aa8492cfe1c.zip
AR::ConPool - reduce post checkout critical section.
Move post checkout connection verification out of mutex.synchronize.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/connection_adapters/adapter_leasing_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb b/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb
index 662e19f35e..fd5f183ab0 100644
--- a/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb
+++ b/activerecord/test/cases/connection_adapters/adapter_leasing_test.rb
@@ -24,7 +24,9 @@ module ActiveRecord
def test_lease_twice
assert @adapter.lease, 'should lease adapter'
- assert_not @adapter.lease, 'should not lease adapter'
+ assert_raises(ActiveRecordError) do
+ @adapter.lease
+ end
end
def test_expire_mutates_in_use