diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-21 23:29:10 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-21 23:29:10 +0300 |
commit | d57d8ddb72e069e14a272a93873271807b3a33d9 (patch) | |
tree | 08f95b3e9906744d5ce1b8314f3a58a090765ddd /spec | |
parent | 45b3f554aabf75ef5b7e0a4f7cb05a67bed05a70 (diff) | |
parent | dbd88c02d6d2e4cb8af5347dd8e7b3ae63079a9d (diff) |
Merge branch 'sidekiq-interrupt-running-jobs-deadset' into 'master'
Put cancelled job in DeadSet
See merge request gitlab-org/gitlab-ce!32070
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb b/spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb index 2933d26a387..7319cdc2399 100644 --- a/spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb +++ b/spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb @@ -33,9 +33,17 @@ describe Gitlab::SidekiqMiddleware::Monitor do end end - it 'does skip this job' do + it 'skips the job' do expect { subject }.to raise_error(Sidekiq::JobRetry::Skip) end + + it 'puts job in DeadSet' do + ::Sidekiq::DeadSet.new.clear + + expect do + subject rescue Sidekiq::JobRetry::Skip + end.to change { ::Sidekiq::DeadSet.new.size }.by(1) + end end end end |