Resolve transient tests failure - expected `stage.status` to have changed, but did not
There is transient failure present in our pipelines, that manifests itself by raising a following, or similar error:
1) Ci::Stage update_status when stage objects needs to be updated updates stage status correctly
Failure/Error:
expect { stage.update_status }
.to change { stage.reload.status }
.to 'running'
expected `stage.reload.status` to have changed to "running", but did not change
# ./spec/models/ci/stage_spec.rb:62:in `block (4 levels) in <top (required)>'
Specs set that makes it reproducible:
spec/requests/api/issues_spec.rb spec/features/merge_requests/diff_notes_avatars_spec.rb spec/requests/api/v3/members_spec.rb spec/services/users/migrate_to_ghost_user_service_spec.rb spec/features/projects/environments/environments_spec.rb spec/requests/api/v3/builds_spec.rb spec/features/protected_branches_spec.rb spec/features/issues/bulk_assignment_labels_spec.rb spec/features/issues/move_spec.rb spec/models/diff_note_spec.rb spec/policies/issue_policy_spec.rb spec/requests/api/deploy_keys_spec.rb spec/lib/banzai/filter/issuable_state_filter_spec.rb spec/features/snippets/user_creates_snippet_spec.rb spec/presenters/merge_request_presenter_spec.rb spec/features/issues/filtered_search/recent_searches_spec.rb spec/features/admin/admin_projects_spec.rb spec/migrations/migrate_stage_id_reference_in_background_spec.rb spec/features/projects/settings/pipelines_settings_spec.rb spec/lib/banzai/filter/snippet_reference_filter_spec.rb spec/features/dashboard/milestone_tabs_spec.rb spec/tasks/gitlab/shell_rake_spec.rb spec/features/reportable_note/issue_spec.rb spec/features/groups/empty_states_spec.rb spec/features/groups/members/sort_members_spec.rb spec/models/ci/stage_spec.rb