From 1e528d24cfed2e5f2169e204df4f35704dcac9fb Mon Sep 17 00:00:00 2001 From: ohbarye Date: Sun, 26 May 2024 17:19:01 +0900 Subject: [PATCH] Fix typo: occured -> occurred https://www.oxfordlearnersdictionaries.com/definition/english/occur --- README.md | 2 +- .../debug_errors/ext/connection_adapters/connection_pool.rb | 2 +- .../ext/connection_adapters/connection_pool_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4254634..483dd28 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ Note that the user requires the PROCESS priviledge to collect the information. When `ActiveRecord::ConnectionTimeoutError` occurs, you can see the information of connection owners (threads): ``` -ActiveRecord::ConnectionTimeoutError occured: +ActiveRecord::ConnectionTimeoutError occurred: connection owners: Thread # status=sleep priority=0 /path/to/activerecord-debug_errors/spec/activerecord/debug_errors/ext/connection_adapters/connection_pool_spec.rb:32:in `join' diff --git a/lib/activerecord/debug_errors/ext/connection_adapters/connection_pool.rb b/lib/activerecord/debug_errors/ext/connection_adapters/connection_pool.rb index f12e9f4..eb4c738 100644 --- a/lib/activerecord/debug_errors/ext/connection_adapters/connection_pool.rb +++ b/lib/activerecord/debug_errors/ext/connection_adapters/connection_pool.rb @@ -15,7 +15,7 @@ def acquire_connection(*args) def dump_threads logger = ActiveRecord::Base.logger - logger.error "ActiveRecord::ConnectionTimeoutError occured:" + logger.error "ActiveRecord::ConnectionTimeoutError occurred:" dump_thread = ->(thread) { logger.error " Thread #{thread} status=#{thread.status} priority=#{thread.priority}" diff --git a/spec/activerecord/debug_errors/ext/connection_adapters/connection_pool_spec.rb b/spec/activerecord/debug_errors/ext/connection_adapters/connection_pool_spec.rb index 7a86bc7..30c8c5c 100644 --- a/spec/activerecord/debug_errors/ext/connection_adapters/connection_pool_spec.rb +++ b/spec/activerecord/debug_errors/ext/connection_adapters/connection_pool_spec.rb @@ -29,7 +29,7 @@ end.each(&:join) }.to raise_error(ActiveRecord::ConnectionTimeoutError) - expect(log.string).to include("ActiveRecord::ConnectionTimeoutError occured:") + expect(log.string).to include("ActiveRecord::ConnectionTimeoutError occurred:") expect(log.string).to include("connection owners:") expect(log.string).to include("other threads")