Skip to content

Fix Flaky spec/controllers/projects/pipelines_controller_spec.rb

What does this MR do and why?

Moving flaky spec to request instead of controller

Controller specs should not be used to write N+1 tests as the controller is only initialized once per example. This could lead to false successes where subsequent “requests” could have queries reduced (for example, because of memoization).

https://docs.gitlab.com/ee/development/database/query_recorder.html#use-request-specs-instead-of-controller-specs

Screenshots or screen recordings

N/A

How to set up and validate locally

Running spec locally should not fail

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #345470 (closed)

Edited by Max Fan

Merge request reports