diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
commit | 983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch) | |
tree | b153cd387c14ba23bd5a07514c7c01fddf6a78a0 /spec/lib/gitlab/sidekiq_middleware | |
parent | a2bddee2cdb38673df0e004d5b32d9f77797de64 (diff) |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/lib/gitlab/sidekiq_middleware')
-rw-r--r-- | spec/lib/gitlab/sidekiq_middleware/duplicate_jobs/server_spec.rb | 13 | ||||
-rw-r--r-- | spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb | 13 |
2 files changed, 4 insertions, 22 deletions
diff --git a/spec/lib/gitlab/sidekiq_middleware/duplicate_jobs/server_spec.rb b/spec/lib/gitlab/sidekiq_middleware/duplicate_jobs/server_spec.rb index 0ea248fbcf1..312ebd30a76 100644 --- a/spec/lib/gitlab/sidekiq_middleware/duplicate_jobs/server_spec.rb +++ b/spec/lib/gitlab/sidekiq_middleware/duplicate_jobs/server_spec.rb @@ -21,18 +21,9 @@ describe Gitlab::SidekiqMiddleware::DuplicateJobs::Server, :clean_gitlab_redis_q end around do |example| - Sidekiq::Testing.inline! { example.run } - end - - before(:context) do - Sidekiq::Testing.server_middleware do |chain| + with_sidekiq_server_middleware do |chain| chain.add described_class - end - end - - after(:context) do - Sidekiq::Testing.server_middleware do |chain| - chain.remove described_class + Sidekiq::Testing.inline! { example.run } end end diff --git a/spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb b/spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb index f64ebece930..fdf643a8ad1 100644 --- a/spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb +++ b/spec/lib/gitlab/sidekiq_middleware/worker_context/server_spec.rb @@ -41,18 +41,9 @@ describe Gitlab::SidekiqMiddleware::WorkerContext::Server do end around do |example| - Sidekiq::Testing.inline! { example.run } - end - - before(:context) do - Sidekiq::Testing.server_middleware do |chain| + with_sidekiq_server_middleware do |chain| chain.add described_class - end - end - - after(:context) do - Sidekiq::Testing.server_middleware do |chain| - chain.remove described_class + Sidekiq::Testing.inline! { example.run } end end |