diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-16 21:08:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-16 21:08:46 +0300 |
commit | aa0f0e992153e84e1cdec8a1c7310d5eb93a9f8f (patch) | |
tree | 4a662bc77fb43e1d1deec78cc7a95d911c0da1c5 /spec/support/redis | |
parent | d47f9d2304dbc3a23bba7fe7a5cd07218eeb41cd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/redis')
-rw-r--r-- | spec/support/redis/redis_shared_examples.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/support/redis/redis_shared_examples.rb b/spec/support/redis/redis_shared_examples.rb index e079c32d6ae..1e2d11a66cb 100644 --- a/spec/support/redis/redis_shared_examples.rb +++ b/spec/support/redis/redis_shared_examples.rb @@ -116,9 +116,9 @@ RSpec.shared_examples "redis_shared_examples" do clear_pool end - context 'when running not on sidekiq workers' do + context 'when running on single-threaded runtime' do before do - allow(Gitlab::Runtime).to receive(:sidekiq?).and_return(false) + allow(Gitlab::Runtime).to receive(:multi_threaded?).and_return(false) end it 'instantiates a connection pool with size 5' do @@ -128,10 +128,10 @@ RSpec.shared_examples "redis_shared_examples" do end end - context 'when running on sidekiq workers' do + context 'when running on multi-threaded runtime' do before do - allow(Gitlab::Runtime).to receive(:sidekiq?).and_return(true) - allow(Sidekiq).to receive(:options).and_return({ concurrency: 18 }) + allow(Gitlab::Runtime).to receive(:multi_threaded?).and_return(true) + allow(Gitlab::Runtime).to receive(:max_threads).and_return(18) end it 'instantiates a connection pool with a size based on the concurrency of the worker' do |