Skip to content

Update flaky spec in group_over_limit_notification_worker_spec

What does this MR do and why?

Related to #444879 (closed)

The root cause of the flakiness seems to be that .first(TOP_LEVEL_GROUPS_LIMIT) here will not guarantee order. So in the test setup, out of the four top level groups, one of the group is under limit, and when the test gets that one group as the top level group to check, of course it does not need to be notified, hence failing the test.

Evidence of out of order can be seen in failures in previous test with slightly different assertions: https://gitlab.com/gitlab-org/gitlab/-/jobs/5723564692#L6129

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Roy Liu

Merge request reports