diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-30 15:27:41 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-30 15:27:41 -0800 |
commit | 41c24eb3e38af99b208c17041199832a0372da8f (patch) | |
tree | 708576ff7cdbee5e70d10d90775abd3f7c3b0888 /activerecord/test | |
parent | cde7692d4e3e0e67e480cc6172f6e2bacaceeb5e (diff) | |
download | rails-41c24eb3e38af99b208c17041199832a0372da8f.tar.gz rails-41c24eb3e38af99b208c17041199832a0372da8f.tar.bz2 rails-41c24eb3e38af99b208c17041199832a0372da8f.zip |
each connection pool has a reaper
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/reaper_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/cases/reaper_test.rb b/activerecord/test/cases/reaper_test.rb index ed3daa175d..3ef86ec5e1 100644 --- a/activerecord/test/cases/reaper_test.rb +++ b/activerecord/test/cases/reaper_test.rb @@ -41,6 +41,18 @@ module ActiveRecord sleep 0.0002 assert_equal(count - 1, pool.connections.length) end + + def test_pool_has_reaper + assert pool.reaper + end + + def test_reaping_frequency_configuration + spec = ActiveRecord::Base.connection_pool.spec + spec = ConnectionSpecification.new(spec.config.dup, spec.adapter_method) + spec.config[:reaping_frequency] = 100 + pool = ConnectionPool.new spec + assert_equal 100, pool.reaper.frequency + end end end end |