diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-30 14:14:13 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-30 14:14:13 -0800 |
commit | e060cf01a5e05bc6eaeee90b8c421d2aa6435b7c (patch) | |
tree | 033f343f95d5d7d8060afc74d6b19c2394d23264 /activerecord/test/cases | |
parent | 17ff88c4d425d7b55ff1a1225cb56f293e7dd7eb (diff) | |
download | rails-e060cf01a5e05bc6eaeee90b8c421d2aa6435b7c.tar.gz rails-e060cf01a5e05bc6eaeee90b8c421d2aa6435b7c.tar.bz2 rails-e060cf01a5e05bc6eaeee90b8c421d2aa6435b7c.zip |
deal with removing connections associated with the current thread
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/connection_pool_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb index d4d0f6258d..10f91d7eb0 100644 --- a/activerecord/test/cases/connection_pool_test.rb +++ b/activerecord/test/cases/connection_pool_test.rb @@ -37,6 +37,14 @@ module ActiveRecord conn.close end + def test_remove_connection_for_thread + conn = @pool.connection + @pool.remove conn + assert_not_equal(conn, @pool.connection) + ensure + conn.close + end + def test_active_connection? assert !@pool.active_connection? assert @pool.connection |