Commit 57508ba7 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Clear memoization of a stubbed object

This fixes succeeding specs that call pipeline_creation_step_histogram
parent 662760b9
......@@ -4,9 +4,15 @@ require 'spec_helper'
RSpec.describe ::Gitlab::Ci::Pipeline::Metrics do
describe '.pipeline_creation_step_duration_histogram' do
it 'adds the step to the step duration histogram' do
around do |example|
described_class.clear_memoization(:pipeline_creation_step_histogram)
example.run
described_class.clear_memoization(:pipeline_creation_step_histogram)
end
it 'adds the step to the step duration histogram' do
expect(::Gitlab::Metrics).to receive(:histogram)
.with(
:gitlab_ci_pipeline_creation_step_duration_seconds,
......
......@@ -19,7 +19,7 @@ RSpec.describe 'Terraform/Base.latest.gitlab-ci.yml' do
allow(project).to receive(:default_branch).and_return(default_branch)
end
it 'does not create any jobs', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/339979' do
it 'does not create any jobs' do
expect(build_names).to be_empty
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment