Skip to content

Improve notification_service_spec - use let_it_be on users

What does this MR do?

Improve notification_service_spec with let_it_be on user creation to avoid having to create users in each test.

A global set of users is created to be used in tests. These users are added to projects/groups as needed in tests and have their notification settings adjusted where needed.

Related: #241148, https://gitlab.com/gitlab-org/plan/-/issues/145

Queries saved: 7602

before

Total time: 02:31.186 of 12:13.215 (20.62%)
Total events: 136411

Finished in 12 minutes 17 seconds (files took 4.93 seconds to load)
322 examples, 0 failures

[TEST PROF INFO] Factories usage

 Total: 2045
 Total top-level: 1837
 Total time: 106.3362s
 Total uniq factories: 34

after

Total time: 02:12.104 of 10:59.638 (20.03%)
Total events: 128809

Finished in 11 minutes 3 seconds (files took 5.57 seconds to load)
322 examples, 0 failures

[TEST PROF INFO] Factories usage

 Total: 1496
 Total top-level: 1288
 Total time: 82.5283s
 Total uniq factories: 34

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability 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 Albert Salim

Merge request reports