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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-18 18:08:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-18 18:08:09 +0300
commita84995f457d775bb73598d4393c3bc99805d9b58 (patch)
treeaddb114fc5a24554f54382a6df7dd03169507230 /spec/support/gitlab
parentc9dcd65796f7dc2c927abd81ef1a923e5f0fd08e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/gitlab')
-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)