diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-04-28 17:47:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 17:47:34 +0200 |
commit | 3917353645b91dae04f7d9b81162fead6f73072a (patch) | |
tree | 202cbf93dfa378c26a291900ea65ec088ee5b5cc /spec/services/precompute_feed_service_spec.rb | |
parent | 9bf04db23acf10e05ffdf7def06c246081f8f065 (diff) |
Fix single Redis connection being used across all threads (#18135)
* Fix single Redis connection being used across all Sidekiq threads * Fix tests
Diffstat (limited to 'spec/services/precompute_feed_service_spec.rb')
-rw-r--r-- | spec/services/precompute_feed_service_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/services/precompute_feed_service_spec.rb b/spec/services/precompute_feed_service_spec.rb index 1f6b6ed88..86b93b5d2 100644 --- a/spec/services/precompute_feed_service_spec.rb +++ b/spec/services/precompute_feed_service_spec.rb @@ -13,7 +13,7 @@ RSpec.describe PrecomputeFeedService, type: :service do subject.call(account) - expect(Redis.current.zscore(FeedManager.instance.key(:home, account.id), status.id)).to be_within(0.1).of(status.id.to_f) + expect(redis.zscore(FeedManager.instance.key(:home, account.id), status.id)).to be_within(0.1).of(status.id.to_f) end it 'does not raise an error even if it could not find any status' do @@ -30,7 +30,7 @@ RSpec.describe PrecomputeFeedService, type: :service do subject.call(account) - expect(Redis.current.zscore(FeedManager.instance.key(:home, account.id), reblog.id)).to eq nil + expect(redis.zscore(FeedManager.instance.key(:home, account.id), reblog.id)).to eq nil end end end |