aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorsteve <coderrr.contact@gmail.com>2009-05-01 16:00:09 +0100
committerPratik Naik <pratiknaik@gmail.com>2009-05-01 16:00:09 +0100
commit60a6284a461afda5911ecadf3a147d4da6ed5d22 (patch)
treef381b224366a157ed05bdb17c0160d56f67296eb /activerecord/test
parent5501b99a19a2a67a9a920fd3c7bff071a2ecf058 (diff)
downloadrails-60a6284a461afda5911ecadf3a147d4da6ed5d22.tar.gz
rails-60a6284a461afda5911ecadf3a147d4da6ed5d22.tar.bz2
rails-60a6284a461afda5911ecadf3a147d4da6ed5d22.zip
Tests should use ActiveRecord::Base.connection.rollback_db_transaction to rollback a transaction
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/pooled_connections_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/pooled_connections_test.rb b/activerecord/test/cases/pooled_connections_test.rb
index bbd943fc6e..bb9013c2a1 100644
--- a/activerecord/test/cases/pooled_connections_test.rb
+++ b/activerecord/test/cases/pooled_connections_test.rb
@@ -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')