Disable sleeping in 'every metric definition' specs
What does this MR do and why?
Disable sleeping in 'every metric definition' specs
This stubs the sleeping duration in the database BatchCounter to zero because sleeping is only relevant for production environments.
This speeds up the spec/config/metrics/every_metric_definition_spec.rb
spec and its EE counterpart by around 10 and 15 seconds respectively.
References
How to set up and validate locally
- Run bundle exec rspec ee/spec/config/metrics/every_metric_definition_spec.rbon this branch andmaster
- See that the spec on this branch is about 15s faster
- Run FOSS_ONLY=1 bundle exec rspec spec/config/metrics/every_metric_definition_spec.rbon this branch andmaster
- See that the spec on this branch is about 10s faster
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited  by Kev Kloss