Commit 58d3db3c authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'leaky-constant-fix-28' into 'master'

Fix leaky constant in sidekiq middleware server metrics spec

See merge request gitlab-org/gitlab!32104
parents 9eb2d34f 821dbff6
......@@ -366,7 +366,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/lib/gitlab/no_cache_headers_spec.rb'
- 'spec/lib/gitlab/path_regex_spec.rb'
- 'spec/lib/gitlab/quick_actions/dsl_spec.rb'
- 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb'
- 'spec/lib/marginalia_spec.rb'
- 'spec/mailers/notify_spec.rb'
- 'spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb'
......
---
title: Fix leaky constant issue in sidekiq middleware server metric spec
merge_request: 32104
author: Rajendra Kadam
type: fixed
......@@ -164,9 +164,13 @@ describe Gitlab::SidekiqMiddleware::ServerMetrics do
end
context "when workers are not attributed" do
class TestNonAttributedWorker
include Sidekiq::Worker
before do
stub_const('TestNonAttributedWorker', Class.new)
TestNonAttributedWorker.class_eval do
include Sidekiq::Worker
end
end
let(:worker) { TestNonAttributedWorker.new }
let(:labels) { default_labels.merge(urgency: "") }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment