Improve performance of notification service specs
What does this MR do and why?
Notifications specs are slow and this is probably due to the fact that we still have most expectations on the actual deliverd email that needs to be rendered first. We need to change expectations so we can check the email has been enqueued and nothing more
describe #new_issue
Before
64.49s user 9.42s system 96% cpu 1:16.40 total
6837 DB queries
After
36.87s user 7.06s system 99% cpu 44.312 total
2110 DB queries
describe Issues
Before
bundle exec rspec spec/services/notification_service_spec.rb:1162 218.27s user 17.55s system 94% cpu 4:09.41 total
After
bundle exec rspec spec/services/notification_service_spec.rb:1204 181.69s user 15.55s system 95% cpu 3:27.35 total
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 #373618
Edited by Mario Celi