Browse files

Tests should use ActiveRecord::Base.connection.rollback_db_transactio…

…n to rollback a transaction

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent 5501b99 commit 60a6284a461afda5911ecadf3a147d4da6ed5d22 @account-settings account-settings committed with lifo May 1, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/pooled_connections_test.rb
View
2 activerecord/test/cases/pooled_connections_test.rb
@@ -103,7 +103,7 @@ def test_with_connection_nesting_safety
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')

0 comments on commit 60a6284

Please sign in to comment.