diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-11-28 19:16:50 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-12-12 19:36:20 +0300 |
commit | b1849ee2e66b6355776397717a33dc7ada772332 (patch) | |
tree | 42cc03621690637e947c0677686ecf24a9771245 /spec/lib/gitlab/sidekiq_config_spec.rb | |
parent | d673628de003d1ce1402f03311066339828fb811 (diff) |
Use a dedicated queue for each worker
Diffstat (limited to 'spec/lib/gitlab/sidekiq_config_spec.rb')
-rw-r--r-- | spec/lib/gitlab/sidekiq_config_spec.rb | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/spec/lib/gitlab/sidekiq_config_spec.rb b/spec/lib/gitlab/sidekiq_config_spec.rb index 09f95be2213..0c66d764851 100644 --- a/spec/lib/gitlab/sidekiq_config_spec.rb +++ b/spec/lib/gitlab/sidekiq_config_spec.rb @@ -16,9 +16,30 @@ describe Gitlab::SidekiqConfig do expect(queues).to include('post_receive') expect(queues).to include('merge') - expect(queues).to include('cronjob') + expect(queues).to include('cronjob:stuck_import_jobs') expect(queues).to include('mailers') expect(queues).to include('default') end end + + describe '.expand_queues' do + it 'expands queue namespaces to concrete queue names' do + queues = described_class.expand_queues(%w[cronjob]) + + expect(queues).to include('cronjob:stuck_import_jobs') + expect(queues).to include('cronjob:stuck_merge_jobs') + end + + it 'lets concrete queue names pass through' do + queues = described_class.expand_queues(%w[post_receive]) + + expect(queues).to include('post_receive') + end + + it 'lets unknown queues pass through' do + queues = described_class.expand_queues(%w[unknown]) + + expect(queues).to include('unknown') + end + end end |