summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2018-09-14 17:27:31 +0300
committerValery Sizov <valery@gitlab.com>2018-09-24 18:41:14 +0300
commit2daa8d387bd4dd87f872d0f195d25e67cd199777 (patch)
treede4a8d3bbdd4f337957aba9555a67e34d2fb5f2a /spec/lib
parent4007456808a9d18858b2c117b9cc6fee91d26ed6 (diff)
downloadgitlab-ce-2daa8d387bd4dd87f872d0f195d25e67cd199777.tar.gz
Remove background job throttling feature51509-remove-sidekiq-limit-fetch
We remove this feature as it never worked properly
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/sidekiq_throttler_spec.rb44
1 files changed, 0 insertions, 44 deletions
diff --git a/spec/lib/gitlab/sidekiq_throttler_spec.rb b/spec/lib/gitlab/sidekiq_throttler_spec.rb
deleted file mode 100644
index 2dbb7bb7c34..00000000000
--- a/spec/lib/gitlab/sidekiq_throttler_spec.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-require 'spec_helper'
-
-describe Gitlab::SidekiqThrottler do
- describe '#execute!' do
- context 'when job throttling is enabled' do
- before do
- Sidekiq.options[:concurrency] = 35
-
- stub_application_setting(
- sidekiq_throttling_enabled: true,
- sidekiq_throttling_factor: 0.1,
- sidekiq_throttling_queues: %w[build project_cache]
- )
- end
-
- it 'requires sidekiq-limit_fetch' do
- expect(described_class).to receive(:require).with('sidekiq-limit_fetch').and_call_original
-
- described_class.execute!
- end
-
- it 'sets limits on the selected queues' do
- described_class.execute!
-
- expect(Sidekiq::Queue['build'].limit).to eq 4
- expect(Sidekiq::Queue['project_cache'].limit).to eq 4
- end
-
- it 'does not set limits on other queues' do
- described_class.execute!
-
- expect(Sidekiq::Queue['merge'].limit).to be_nil
- end
- end
-
- context 'when job throttling is disabled' do
- it 'does not require sidekiq-limit_fetch' do
- expect(described_class).not_to receive(:require).with('sidekiq-limit_fetch')
-
- described_class.execute!
- end
- end
- end
-end