diff options
author | thedarkone <thedarkone2@gmail.com> | 2015-04-04 22:33:32 +0200 |
---|---|---|
committer | thedarkone <thedarkone2@gmail.com> | 2015-05-14 02:25:57 +0200 |
commit | a3923e667ca2c78734665389be964aa8492cfe1c (patch) | |
tree | 2208fc621f40a2829ae0d73eb482afd0c4e26ef6 /activerecord/test/cases | |
parent | 2c7c11d545dff93d91af4555d3babea813ccd3b3 (diff) | |
download | rails-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.rb | 4 |
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 |