diff --git a/spec/activerecord/debug_errors/ext/connection_adapters/abstract_mysql_adapter_spec.rb b/spec/activerecord/debug_errors/ext/connection_adapters/abstract_mysql_adapter_spec.rb index d76df70..03d0dfd 100644 --- a/spec/activerecord/debug_errors/ext/connection_adapters/abstract_mysql_adapter_spec.rb +++ b/spec/activerecord/debug_errors/ext/connection_adapters/abstract_mysql_adapter_spec.rb @@ -74,10 +74,11 @@ def cause_deadlock(role:) ths = Array.new(2) do Thread.new do + Thread.current.abort_on_exception = true User.transaction do barrier.await(1) User.lock.find_by!(name: 'foo') - sleep 2 + sleep 5 end end end