Skip to content

Set exit status in rspec instead of stubbing

Reuben Pereira requested to merge rp/fix-flaky-process-last-status-spec into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Content

Stubbing Process.last_status is flaky and doesn't always work, so instead let's set the last_status to 0 by running exit 0 in a subprocess.

The flaky spec can be seen by running: bundle exec rspec --seed 19095 spec/lib/release_tools/remote_repository_spec.rb locally. See https://gitlab.com/gitlab-org/release-tools/-/jobs/7631418921 for the same failure in CI.

Author Check-list

  • Has documentation been updated?

Merge request reports

Loading