diff options
Diffstat (limited to 'spec/workers/concerns/gitlab')
-rw-r--r-- | spec/workers/concerns/gitlab/github_import/object_importer_spec.rb | 3 | ||||
-rw-r--r-- | spec/workers/concerns/gitlab/github_import/rescheduling_methods_spec.rb | 2 | ||||
-rw-r--r-- | spec/workers/concerns/gitlab/import/notify_upon_death_spec.rb (renamed from spec/workers/concerns/gitlab/notify_upon_death_spec.rb) | 10 |
3 files changed, 8 insertions, 7 deletions
diff --git a/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb b/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb index 3b7bbfc8a7b..27e1077b138 100644 --- a/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb +++ b/spec/workers/concerns/gitlab/github_import/object_importer_spec.rb @@ -273,7 +273,8 @@ RSpec.describe Gitlab::GithubImport::ObjectImporter, :aggregate_failures, featur .to receive(:notify) .with( job['args'].last, - job['jid'] + job['jid'], + ttl: Gitlab::Import::JOB_WAITER_TTL ) sidekiq_retries_exhausted diff --git a/spec/workers/concerns/gitlab/github_import/rescheduling_methods_spec.rb b/spec/workers/concerns/gitlab/github_import/rescheduling_methods_spec.rb index 6475be0243c..c76ce6b555f 100644 --- a/spec/workers/concerns/gitlab/github_import/rescheduling_methods_spec.rb +++ b/spec/workers/concerns/gitlab/github_import/rescheduling_methods_spec.rb @@ -110,7 +110,7 @@ RSpec.describe Gitlab::GithubImport::ReschedulingMethods, feature_category: :imp expect(Gitlab::JobWaiter) .to receive(:notify) - .with('123', 'abc123') + .with('123', 'abc123', ttl: Gitlab::Import::JOB_WAITER_TTL) worker.notify_waiter('123') end diff --git a/spec/workers/concerns/gitlab/notify_upon_death_spec.rb b/spec/workers/concerns/gitlab/import/notify_upon_death_spec.rb index 36faf3ee296..1f760e8542b 100644 --- a/spec/workers/concerns/gitlab/notify_upon_death_spec.rb +++ b/spec/workers/concerns/gitlab/import/notify_upon_death_spec.rb @@ -2,11 +2,11 @@ require 'spec_helper' -RSpec.describe Gitlab::NotifyUponDeath, feature_category: :shared do +RSpec.describe Gitlab::Import::NotifyUponDeath, feature_category: :importers do let(:worker_class) do Class.new do include Sidekiq::Worker - include Gitlab::NotifyUponDeath + include Gitlab::Import::NotifyUponDeath end end @@ -16,13 +16,13 @@ RSpec.describe Gitlab::NotifyUponDeath, feature_category: :shared do expect(Gitlab::JobWaiter) .to receive(:notify) - .with('123abc', '123') + .with('123abc', '123', ttl: Gitlab::Import::JOB_WAITER_TTL) worker_class.sidekiq_retries_exhausted_block.call(job) end it 'does not notify the JobWaiter when only 2 arguments are given' do - job = { 'args' => [12, {}], 'jid' => '123' } + job = { 'args' => [12, '123abc'], 'jid' => '123' } expect(Gitlab::JobWaiter) .not_to receive(:notify) @@ -31,7 +31,7 @@ RSpec.describe Gitlab::NotifyUponDeath, feature_category: :shared do end it 'does not notify the JobWaiter when only 1 argument is given' do - job = { 'args' => [12], 'jid' => '123' } + job = { 'args' => ['123abc'], 'jid' => '123' } expect(Gitlab::JobWaiter) .not_to receive(:notify) |