aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-12-13 11:41:53 -0500
committerGitHub <noreply@github.com>2017-12-13 11:41:53 -0500
commit8da117ed4387773850d9102ae1c8de4765058ce7 (patch)
treebbaaa04979f4d35e6179df90d77ba69dd74a533a /activerecord/test/cases/adapters/postgresql
parent53593a66362550367561507e12576a876a0cbb6c (diff)
parent1d3fe75649e9e5dd9efacb7a6a0d9e9d12b3df34 (diff)
downloadrails-8da117ed4387773850d9102ae1c8de4765058ce7.tar.gz
rails-8da117ed4387773850d9102ae1c8de4765058ce7.tar.bz2
rails-8da117ed4387773850d9102ae1c8de4765058ce7.zip
Merge pull request #31428 from yahonda/report_on_exception_true_in_ruby25
Suppress expected exceptions by `report_on_exception` = `false`
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql')
-rw-r--r--activerecord/test/cases/adapters/postgresql/transaction_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/transaction_test.rb b/activerecord/test/cases/adapters/postgresql/transaction_test.rb
index c24dfeb345..9821b103df 100644
--- a/activerecord/test/cases/adapters/postgresql/transaction_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/transaction_test.rb
@@ -14,6 +14,7 @@ module ActiveRecord
setup do
@abort, Thread.abort_on_exception = Thread.abort_on_exception, false
+ Thread.report_on_exception, @original_report_on_exception = false, Thread.report_on_exception if Thread.respond_to?(:report_on_exception)
@connection = ActiveRecord::Base.connection
@@ -31,6 +32,7 @@ module ActiveRecord
@connection.drop_table "samples", if_exists: true
Thread.abort_on_exception = @abort
+ Thread.report_on_exception = @original_report_on_exception if Thread.respond_to?(:report_on_exception)
end
test "raises SerializationFailure when a serialization failure occurs" do