diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-18 18:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-18 18:08:09 +0300 |
commit | a84995f457d775bb73598d4393c3bc99805d9b58 (patch) | |
tree | addb114fc5a24554f54382a6df7dd03169507230 /spec/support/gitlab | |
parent | c9dcd65796f7dc2c927abd81ef1a923e5f0fd08e (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.rb | 4 |
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) |