Speed up integration specs
What does this MR do and why?
This MR refactors spec/models/integrations/*
to use let_it_be
, build
, build_stubbed
for factories, where possible. These greatly speeds up the specs by removing redundant factory initializations.
Performance
Before
[TEST PROF INFO] Time spent in factories: 35:42.369 (88.81% of total time)
After
[TEST PROF INFO] Time spent in factories: 04:36.618 (61.59% of total time)
How to set up and validate locally
- Run
spec/models/integrations/
locally - Run
spec/models/integration.rb
locally
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Bojan Marjanovic