Commit 48b30e77 authored by Stan Hu's avatar Stan Hu

Disable the background Prometheus sampler in tests

This sampler can interfere with tests and cause transient build failures,
such as https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/70241683.
parent 05170e0d
......@@ -25,7 +25,7 @@ Sidekiq.configure_server do |config|
end
end
if Gitlab::Metrics.prometheus_metrics_enabled?
if !Rails.env.test? && Gitlab::Metrics.prometheus_metrics_enabled?
unless Sidekiq.server?
Gitlab::Metrics::Samplers::UnicornSampler.initialize_instance(Settings.monitoring.unicorn_sampler_interval).start
end
......
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