mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user