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>2021-04-27 00:10:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-27 00:10:25 +0300
commit70cfa5e3e7e6765590a664165eac0ef00c3d05dc (patch)
tree52216b5c0b72688f14dc5b481bc86a7eb9d0acb4 /spec/services
parente7e40d45b066139707b3b851c6004e075da5226b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/ci/destroy_pipeline_service_spec.rb3
-rw-r--r--spec/services/ci/expire_pipeline_cache_service_spec.rb3
2 files changed, 6 insertions, 0 deletions
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