Commit 9bf98911 authored by Terri Chu's avatar Terri Chu

Merge branch '344956-fix-prepare-commits-for-rendering-spec' into 'master'

Fix prepare_commits_for_rendering N+1 spec

See merge request gitlab-org/gitlab!73954
parents e4d7915e de16b6d3
......@@ -64,6 +64,12 @@ RSpec.describe RendersCommits do
subject.prepare_commits_for_rendering(merge_request.commits.take(1))
end
# Populate Banzai::Filter::References::ReferenceCache
subject.prepare_commits_for_rendering(merge_request.commits)
# Reset lazy_latest_pipeline cache to simulate a new request
BatchLoader::Executor.clear_current
expect do
subject.prepare_commits_for_rendering(merge_request.commits)
merge_request.commits.each(&:latest_pipeline)
......
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