Skip to content
Snippets Groups Projects

Speed up Project security access specs

Merged Robert Speicher requested to merge rs-project-security-spec-speed into master

Prior, every single test was creating four ProjectMember objects, each of which created one User record, even though each test only used one of those Users, if any.

Now each test only creates the single user record it needs, if it needs one. This shaves minutes off of each spec file changed here.

Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/24899

Merge request reports

Pipeline #5162425 passed

Pipeline passed for 13ad9a74 on rs-project-security-spec-speed

Test coverage 90.31% (-0.15%) from 1 job

Merged by avatar (Apr 2, 2025 4:08am UTC)

Loading

Pipeline #5163343 passed with warnings

Pipeline passed with warnings for 6ea0b8d5 on master

Test coverage 90.49% (-0.15%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • @rspeicher Awesome, simply love it!!

  • Reassigned to @rspeicher

  • Robert Speicher Added 1 commit:

    Added 1 commit:

    • 13ad9a74 - Speed up Project security access specs

    Compare with previous version

  • Robert Speicher Resolved all discussions

    Resolved all discussions

  • @rymai Thanks! Should be all set.

  • Reassigned to @rymai

  • @rspeicher Thanks, LGTM! Please also open a EE MR! ;)

  • Rémy Coutable Enabled an automatic merge when the build for 13ad9a74 succeeds

    Enabled an automatic merge when the build for 13ad9a74 succeeds

  • @rymai Done in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/919. Strangely it didn't conflict for me locally. 😕

  • Rémy Coutable Status changed to merged

    Status changed to merged

  • Rémy Coutable Mentioned in commit 6ea0b8d5

    Mentioned in commit 6ea0b8d5

  • Another nice find!

  • Robert Speicher Mentioned in merge request !7813 (merged)

    Mentioned in merge request !7813 (merged)

  • Rémy Coutable Mentioned in commit 2e034dbe

    Mentioned in commit 2e034dbe

  • Robert Speicher mentioned in merge request !7890 (merged)

    mentioned in merge request !7890 (merged)

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading