diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2017-12-14 19:30:50 +0000 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2017-12-14 19:33:34 +0000 |
commit | 521c9468e252129770813fa110ca7272c0096aaa (patch) | |
tree | 19a0c1751bbb2bb8c20a0e91e8cc5e6ec82f6f5e /activerecord/test/cases/adapters/mysql2 | |
parent | 659c516bef2781cc66865fc78ed5dce682566d26 (diff) | |
download | rails-521c9468e252129770813fa110ca7272c0096aaa.tar.gz rails-521c9468e252129770813fa110ca7272c0096aaa.tar.bz2 rails-521c9468e252129770813fa110ca7272c0096aaa.zip |
Suppress expected exceptions by `report_on_exception` = `false`
Follow up #31428 to address similar exceptions with mysql2 adapter
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/transaction_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/transaction_test.rb b/activerecord/test/cases/adapters/mysql2/transaction_test.rb index cb183cc54c..f921515c10 100644 --- a/activerecord/test/cases/adapters/mysql2/transaction_test.rb +++ b/activerecord/test/cases/adapters/mysql2/transaction_test.rb @@ -13,6 +13,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 @connection.clear_cache! @@ -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 Deadlocked when a deadlock is encountered" do |