Skip to content

Speed-up project specs for "#feature_available?"

Peter Leitzen requested to merge pl-perf-project-specs into master

What does this MR do?

This MRs speeds-up ee/spec/models/project_spec.rb by preferring build() over create().

Before

$ bin/spring rspec ee/spec/models/project_spec.rb -e feature_available
Finished in 1 minute 31.73 seconds (files took 1.19 seconds to load)
493 examples, 0 failures

After

$ bin/spring rspec ee/spec/models/project_spec.rb -e feature_available
Finished in 19.38 seconds (files took 1.01 seconds to load)
493 examples, 0 failures

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Leitzen

Merge request reports