Flaky test fix: reload page between pause and resume in runner spec
What does this MR do and why?
Context
The 'pauses, resumes and deletes a runner' shared example is currently the
top pipeline-blocking flaky test. Every recorded failure is the resume half:
the row still reads "Paused" 30s after the resume click and the finder times
out. The pause half, which uses the same button and the same mutation, has
never failed. The difference is that the pause click lands on a freshly
loaded page, while the resume click fires as the pause mutation settles.
Three earlier fixes treated this as a Capybara wait problem and none held: !240917 (merged), !242256 (merged), !243022 (merged).
This MR
Reload the page between the two halves so the resume click acts on a settled page. Pausing fires a follow-up counts refetch and a row re-render that the spec never waits for; reloading waits out the whole transition rather than one observable part of it, which is where the earlier fixes fell short. The reload also asserts that the pause persisted, which the spec did not check before.
The change is in the shared example, so it covers the admin and project-maintainer specs that use it as well.
References
- https://gitlab.com/gitlab-org/quality/test-failure-issues/-/work_items/43855+
- https://gitlab.com/gitlab-org/quality/test-failure-issues/-/work_items/43165+
How to set up and validate locally
-
Run the specs that use the shared example:
bundle exec rspec \ spec/features/groups/runners/owner_manages_runners_spec.rb \ spec/features/admin/runners/admin_manages_runners_spec.rb \ spec/features/projects/runners/maintainer_manages_project_runners_spec.rb
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.