From 521c9468e252129770813fa110ca7272c0096aaa Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Thu, 14 Dec 2017 19:30:50 +0000 Subject: Suppress expected exceptions by `report_on_exception` = `false` Follow up #31428 to address similar exceptions with mysql2 adapter --- activerecord/test/cases/adapters/mysql2/transaction_test.rb | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3