about summary refs log tree commit diff
path: root/spec/services
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-04-29 22:43:07 +0200
committerGitHub <noreply@github.com>2022-04-29 22:43:07 +0200
commit7b0fe4aef97c6a5f73a03146b669a415f396799c (patch)
tree328a1117bf021f1ffc0e126e9563f71b31862f1e /spec/services
parent6476f7e4da4da7c353d497aae5a86fc3909ce532 (diff)
Fix opening and closing Redis connections instead of using a pool (#18171)
* Fix opening and closing Redis connections instead of using a pool

* Fix Redis connections not being returned to the pool in CLI commands
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/resolve_account_service_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/services/resolve_account_service_spec.rb b/spec/services/resolve_account_service_spec.rb
index 7b1e8885c..8c302e1d8 100644
--- a/spec/services/resolve_account_service_spec.rb
+++ b/spec/services/resolve_account_service_spec.rb
@@ -220,6 +220,8 @@ RSpec.describe ResolveAccountService, type: :service do
           return_values << described_class.new.call('foo@ap.example.com')
         rescue ActiveRecord::RecordNotUnique
           fail_occurred = true
+        ensure
+          RedisConfiguration.pool.checkin if Thread.current[:redis]
         end
       end
     end