Improve slow test for lib/sidebars/projects/menus/merge_requests_menu.rb
Context
Closes #413648 (closed).
The spec ./spec/lib/sidebars/projects/menus/merge_requests_menu_spec.rb:76
takes 3 minutes to run in the CI (source):
What does this MR do and why?
Make a slow spec much faster (from 1min40sec to 9sec locally
Results
Before
$ be rspec spec/lib/sidebars/projects/menus/merge_requests_menu_spec.rb:75
Run options: include {:focus=>true, :locations=>{"./spec/lib/sidebars/projects/menus/merge_requests_menu_spec.rb"=>[75]}}
Test environment set up in 5.624774 seconds
.
Finished in 1 minute 40.05 seconds (files took 11.44 seconds to load)
1 example, 0 failures
After
$ be rspec spec/lib/sidebars/projects/menus/merge_requests_menu_spec.rb:75
Run options: include {:focus=>true, :locations=>{"./spec/lib/sidebars/projects/menus/merge_requests_menu_spec.rb"=>[75]}}
Test environment set up in 5.828089 seconds
.
Finished in 8.76 seconds (files took 12.11 seconds to load)
1 example, 0 failures
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.