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_versioning | |
parent | d673628de003d1ce1402f03311066339828fb811 (diff) |
Use a dedicated queue for each worker
Diffstat (limited to 'spec/lib/gitlab/sidekiq_versioning')
-rw-r--r-- | spec/lib/gitlab/sidekiq_versioning/manager_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/lib/gitlab/sidekiq_versioning/manager_spec.rb b/spec/lib/gitlab/sidekiq_versioning/manager_spec.rb new file mode 100644 index 00000000000..7debf70a16f --- /dev/null +++ b/spec/lib/gitlab/sidekiq_versioning/manager_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe Gitlab::SidekiqVersioning::Manager do + before do + Sidekiq::Manager.prepend described_class + end + + describe '#initialize' do + it 'listens on all expanded queues' do + manager = Sidekiq::Manager.new(queues: %w[post_receive repository_fork cronjob unknown]) + + queues = manager.options[:queues] + + expect(queues).to include('post_receive') + expect(queues).to include('repository_fork') + expect(queues).to include('cronjob') + expect(queues).to include('cronjob:stuck_import_jobs') + expect(queues).to include('cronjob:stuck_merge_jobs') + expect(queues).to include('unknown') + end + end +end |