Follow-up from "Do not outdate merge train cars if skip-train setting is enabled"
The following discussion from !132325 (merged) should be addressed:
-
@group_9970_bot_58e69a7d2ace73c7373ac2bc2a5cabd0 started a discussion: (+1 comment) let_it_be(:project) { create(:project, :public, :repository, creator: user, namespace: user.namespace) }
Project creations are very slow. To improve test performance, consider using
let_it_be
,build
, orbuild_stubbed
instead.⚠️ Warning: If your test modifies data,let_it_be
may be unsuitable, and cause state leaks! Uselet_it_be_with_reload
orlet_it_be_with_refind
instead.Unsure which method to use? See the testing best practices for background information and alternative options for optimizing factory usage.
If you're concerned about causing state leaks, or if you know
let
orlet!
are the better options, ignore this comment.
@drew: Please see the most recent commit in this MR: !132325 (04907840)
I've added a lot of extra setup here to avoid flakiness in these tests. There's a ton of shared state happening in this spec file that makes writing multiple tests that actually merge MRs very difficult.
I'm opening a follow-up about this because it's a pain to work with, but certainly outside the scope of this MR.