Skip to content

Remove let_it_be shared state from deletion specs

drew stachon requested to merge fix-flaky-deleted-object-context into master

What does this MR do and why?

This MR fixes some flakiness that we saw pop up in gitlab-org/release/tasks#6753 (closed)

We've been using let_it_be to create DeletedObject records that get deleted by certain specs, and we have multiple specs in the context that check total counts and assert that each one may or may not have been deleted.

It's been confirmed to not be a repeated failure gitlab-org/release/tasks#6753 (comment 1597408115) and we haven't been able to reproduce it, but this is a kind of obvious problem so I'd like to make the change now and we expect it to keep these specs from failing again for similar one-off chance reasons.

How to set up and validate locally

Nothing should have changed locally, the specs can be run and they still pass.

MR acceptance checklist

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

Merge request reports