Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/gitlab/usage/metrics_instrumentation_shared_examples.rb')
-rw-r--r--spec/support/gitlab/usage/metrics_instrumentation_shared_examples.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/gitlab/usage/metrics_instrumentation_shared_examples.rb b/spec/support/gitlab/usage/metrics_instrumentation_shared_examples.rb
index 4624a8ac82a..e02bf66507a 100644
--- a/spec/support/gitlab/usage/metrics_instrumentation_shared_examples.rb
+++ b/spec/support/gitlab/usage/metrics_instrumentation_shared_examples.rb
@@ -5,6 +5,10 @@ RSpec.shared_examples 'a correct instrumented metric value' do |params|
let(:options) { params[:options] }
let(:metric) { described_class.new(time_frame: time_frame, options: options) }
+ around do |example|
+ freeze_time { example.run }
+ end
+
before do
if described_class.respond_to?(:relation) && described_class.relation.respond_to?(:connection)
allow(described_class.relation.connection).to receive(:transaction_open?).and_return(false)