Optimize factory usage for path locks helper spec

What does this MR do and why?

This MR replaces create with build_stubbed in ee/spec/helpers/path_locks_helper_spec.rb to optimize the factory usage as recommended in our handbook.

Average time of 5 runs before update: 13.258
Average time of 5 runs after the update: 10.948
🚀 Performance improved!
Speedup: 2.31s (17.4% faster)

References

Relates to: #378910.

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.

Merge request reports

Loading