From 70cfa5e3e7e6765590a664165eac0ef00c3d05dc Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 26 Apr 2021 21:10:25 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/services/ci/destroy_pipeline_service_spec.rb | 3 +++ spec/services/ci/expire_pipeline_cache_service_spec.rb | 3 +++ 2 files changed, 6 insertions(+) (limited to 'spec/services') diff --git a/spec/services/ci/destroy_pipeline_service_spec.rb b/spec/services/ci/destroy_pipeline_service_spec.rb index 0a68f387e65..f226a129fac 100644 --- a/spec/services/ci/destroy_pipeline_service_spec.rb +++ b/spec/services/ci/destroy_pipeline_service_spec.rb @@ -24,6 +24,9 @@ RSpec.describe ::Ci::DestroyPipelineService do subject + # We need to reset lazy_latest_pipeline cache to simulate a new request + BatchLoader::Executor.clear_current + # Need to use find to avoid memoization expect(Project.find(project.id).pipeline_status.has_status?).to be_falsey end diff --git a/spec/services/ci/expire_pipeline_cache_service_spec.rb b/spec/services/ci/expire_pipeline_cache_service_spec.rb index 0c9b7635392..ca37496657a 100644 --- a/spec/services/ci/expire_pipeline_cache_service_spec.rb +++ b/spec/services/ci/expire_pipeline_cache_service_spec.rb @@ -60,6 +60,9 @@ RSpec.describe Ci::ExpirePipelineCacheService do pipeline_with_commit.destroy! + # We need to reset lazy_latest_pipeline cache to simulate a new request + BatchLoader::Executor.clear_current + # Need to use find to avoid memoization expect(Project.find(project_with_repo.id).pipeline_status.has_status?).to be_falsey end -- cgit v1.2.3