Commit bdfd15ea authored by Peter Leitzen's avatar Peter Leitzen

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

Fix leaky constant in sidekiq middleware client metric specs

See merge request gitlab-org/gitlab!32108
parents 3920092d 630af4a5
......@@ -365,7 +365,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/client_metrics_spec.rb'
- 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb'
- 'spec/lib/marginalia_spec.rb'
- 'spec/mailers/notify_spec.rb'
......
---
title: Fix leaky constant issue in sidekiq middleware client metric spec
merge_request: 32108
author: Rajendra Kadam
type: fixed
......@@ -47,8 +47,11 @@ describe Gitlab::SidekiqMiddleware::ClientMetrics 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
it_behaves_like "a metrics client middleware" do
......
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