From 41be0fc3df4cc080df912ae87bd1c8503f2b348d Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 3 Jan 2012 11:06:27 -0800 Subject: [PATCH] actually disconnect from the database at the end of each test --- activerecord/test/cases/connection_pool_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb index 26842d3998..2c69bfde5b 100644 --- a/activerecord/test/cases/connection_pool_test.rb +++ b/activerecord/test/cases/connection_pool_test.rb @@ -22,7 +22,7 @@ module ActiveRecord def teardown super - @pool.connections.each(&:close) + @pool.disconnect! end def test_full_pool_exception @@ -81,7 +81,7 @@ module ActiveRecord @pool.remove conn assert_not_equal(conn, @pool.connection) ensure - conn.close + conn.close if conn end def test_active_connection?