From 48b30e7789db76cf63f84f212e5d14d5583a1f49 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 24 May 2018 06:02:39 -0700 Subject: 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. --- config/initializers/7_prometheus_metrics.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1