Optimize runner feature tests
What does this MR do and why?
This change makes feature tests faster by removing redundant setup steps in tests.
Result
We gain ~30 seconds in each test suite (local runs on M1 Macbook Pro):
Spec | Before | After |
---|---|---|
spec/features/admin/admin_runners_spec.rb |
Finished in 6 minutes 36 seconds (files took 12.14 seconds to load)
|
Finished in 6 minutes 3 seconds (files took 12.01 seconds to load)
|
spec/features/groups/group_runners_spec.rb |
Finished in 2 minutes 37.6 seconds (files took 12.01 seconds to load)
|
Finished in 1 minute 55.87 seconds (files took 12.38 seconds to load)
|
Issues
After this is merged, I propose to close #420824 (closed) and #421743 (closed), and revisit these slow tests if the issues get reopened by the test bot.
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.
Related to #421743 (closed)
Edited by Miguel Rincon