Reduce number of records for task list spec
What does this MR do?
Reduces number of records we create for task list specs. Part of our goal to improve test efficiency: https://gitlab.com/gitlab-org/plan/-/issues/145.
Summary
Before
EVENT_PROF='sql.active_record' ber /Users/nicolas/dev/gdk/gitlab/spec/features/task_lists_spec.rb
Running via Spring preloader in process 33734
[TEST PROF INFO] Activating EVENT_PROF with `Spring.after_fork`
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
[TEST PROF INFO] EventProf enabled (sql.active_record)
Starting the Capybara driver server...
Capybara starting Puma...
* Version 4.3.3.gitlab.2 , codename: Mysterious Traveller
* Min threads: 0, max threads: 4
* Listening on unix:///var/folders/h3/c2c4gt8j16j6r3143xz0c7p40000gn/T/20200825-33734-e38uzh
..........................[TEST PROF INFO] EventProf results for sql.active_record
Total time: 00:14.189 of 02:14.896 (10.52%)
Total events: 11151
Top 5 slowest suites (by time):
Task Lists (./spec/features/task_lists_spec.rb:5) – 00:14.189 (11151 / 26) of 02:14.896 (10.52%)
After
EVENT_PROF='sql.active_record' ber /Users/nicolas/dev/gdk/gitlab/spec/features/task_lists_spec.rb
Running via Spring preloader in process 32813
[TEST PROF INFO] Activating EVENT_PROF with `Spring.after_fork`
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
[TEST PROF INFO] EventProf enabled (sql.active_record)
Starting the Capybara driver server...
Capybara starting Puma...
* Version 4.3.3.gitlab.2 , codename: Mysterious Traveller
* Min threads: 0, max threads: 4
* Listening on unix:///var/folders/h3/c2c4gt8j16j6r3143xz0c7p40000gn/T/20200825-32813-118ykj0
..........................[TEST PROF INFO] EventProf results for sql.active_record
Total time: 00:09.391 of 01:58.605 (7.92%)
Total events: 7019
Top 5 slowest suites (by time):
Task Lists (./spec/features/task_lists_spec.rb:5) – 00:09.391 (7019 / 26) of 01:58.605 (7.92%)
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
Edited by Nicolas Dular