Skip to content

Improve MR discussions spec performance

Heinrich Lee Yu requested to merge improve-mr-discussions-spec into master

What does this MR do and why?

Create the discussions before visiting the MR page so that we don't need to wait for the notes polling request for the discussions to show up.

Locally, I ran:

bin/rspec spec/features/merge_request/user_sees_discussions_navigation_spec.rb:166bin/rspec spec/features/merge_request/user_sees_discussions_navigation_spec.rb:166

Before:

Finished in 54.97 seconds (files took 12.93 seconds to load)
2 examples, 0 failures

After:

Finished in 41.81 seconds (files took 12.82 seconds to load)
2 examples, 0 failures

This shared example is executed 3 times. So we could potentially save ~30 seconds.

MR acceptance checklist

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

Edited by Heinrich Lee Yu

Merge request reports

Loading