Tests should use ActiveRecord::Base.connection.rollback_db_transaction to rollback a transaction

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
This commit is contained in:
steve
2009-05-01 16:00:09 +01:00
committed by Pratik Naik
parent 5501b99a19
commit 60a6284a46

View File

@@ -103,7 +103,7 @@ class PooledConnectionsTest < ActiveRecord::TestCase
add_record('two')
# Have another thread try to screw up the transaction
Thread.new do
raise ActiveRecord::Rollback
ActiveRecord::Base.connection.rollback_db_transaction
ActiveRecord::Base.connection_pool.release_connection
end.join rescue nil
add_record('three')