Skip to content

Fix flaky MergeRequestUserEntity test

Pedro Pombeiro requested to merge pedropombeiro/fix-flakey-test into master

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR fixes the use of let_it_be for :user since that object gets modified in line 49. Depending on the order that tests are executed, the test at spec/serializers/merge_request_user_entity_spec.rb:27 fails.

To test both scenarios, use bin/rspec 'spec/serializers/merge_request_user_entity_spec.rb' --seed 4890

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Pedro Pombeiro

Merge request reports

Loading