Skip to content

Speed up integration specs

Bojan Marjanovic requested to merge bmarjanovic/speed-up-integrations-spec into master

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

  1. Run spec/models/integrations/ locally
  2. 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.

Edited by Bojan Marjanovic

Merge request reports