diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-12-11 22:24:07 +0100 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-12-12 18:38:28 +0100 |
commit | 5904b033dba553636ae2a06cbf1469d8f19df040 (patch) | |
tree | cb6236545d1b06d3d359bf72f2db47d45da692df /spec/lib | |
parent | 6af849644dd097f7b41a26ca8b49d274444db196 (diff) | |
download | gitlab-ce-5904b033dba553636ae2a06cbf1469d8f19df040.tar.gz |
Implemente measurement enabled cache using AtomicReference
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/metrics/method_call_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/metrics/method_call_spec.rb b/spec/lib/gitlab/metrics/method_call_spec.rb index f514fdd70ed..eca6a2cb54a 100644 --- a/spec/lib/gitlab/metrics/method_call_spec.rb +++ b/spec/lib/gitlab/metrics/method_call_spec.rb @@ -21,7 +21,7 @@ describe Gitlab::Metrics::MethodCall do context 'prometheus instrumentation is enabled' do before do allow(Feature.get(:prometheus_metrics_method_instrumentation)).to receive(:enabled?).and_call_original - described_class.call_measurement_enabled_cache_expire + described_class::MEASUREMENT_ENABLED_CACHE.set({enabled: false, expires_at: Time.now - 1.second}) Feature.get(:prometheus_metrics_method_instrumentation).enable end @@ -62,7 +62,7 @@ describe Gitlab::Metrics::MethodCall do context 'prometheus instrumentation is disabled' do before do - described_class.call_measurement_enabled_cache_expire + described_class::MEASUREMENT_ENABLED_CACHE.set({enabled: false, expires_at: Time.now}) Feature.get(:prometheus_metrics_method_instrumentation).disable end |