diff options
author | Stan Hu <stanhu@gmail.com> | 2018-05-24 16:02:39 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-05-24 16:02:39 +0300 |
commit | 48b30e7789db76cf63f84f212e5d14d5583a1f49 (patch) | |
tree | cd414198d56419b62daf0dcf0c5639163714060f /config/initializers | |
parent | 05170e0d4731da2bd1920c91f1e9c9cbed3c4f17 (diff) |
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.
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/7_prometheus_metrics.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb index eb7959e4da6..146c4b1e024 100644 --- a/config/initializers/7_prometheus_metrics.rb +++ b/config/initializers/7_prometheus_metrics.rb @@ -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 |