Skip to content

Improve time to run cluster application specs

Thong Kuah requested to merge improve_cluster_application_spec_time into master

What does this MR do?

Use let_it_be to re-use an associated object.

Found with Factory Doctor

Screenshot

Before vs after of running FPROF=flamegraph bundle exec spring rspec spec/models/clusters applications/cert_manager.rb -e "#available" (https://gitlab.com/gitlab-org/gitlab/-/blob/b83b085b65678c42756a06bca6841b8acc69d30b/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb#L264-292). This was the most expensive part factory-wise

Screen_Shot_2020-03-10_at_9.52.30_AM

Edited by 🤖 GitLab Bot 🤖

Merge request reports