Speed up specs for AlertManagement::Alert
What does this MR do?
Closes #227140 (closed)
Speed up specs for AlertManagement::Alert
.
Before
Finished in 38.84 seconds (files took 52.61 seconds to load)
74 examples, 0 failures
[TEST PROF INFO] Factories usage
Total: 107
Total top-level: 61
Total time: 8.7734s
Total uniq factories: 5
total top-level total time top-level time name
41 41 3.8132s 3.8132s alert_management_alert
32 18 7.8100s 4.9058s project
32 0 1.9448s 0.0000s namespace
1 1 0.0292s 0.0292s license
1 1 0.0252s 0.0252s environment
After
Finished in 5.23 seconds (files took 32.34 seconds to load)
74 examples, 0 failures
[TEST PROF INFO] Factories usage
Total: 12
Total top-level: 10
Total time: 1.0885s
Total uniq factories: 5
total top-level total time top-level time name
6 6 0.1050s 0.1050s alert_management_alert
2 2 0.9549s 0.9549s project
2 0 0.1538s 0.0000s namespace
1 1 0.0089s 0.0089s license
1 1 0.0196s 0.0196s environment
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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