Draft: Wait for test resource deletion
What does this MR do and why?
This waits for a resource to truly be deleted before proceeding.
Some resources, such as projects, have relations stored in tables that can deleted before the resource itself. That can results in errors when trying to retrieve the resource.
For example, if a test deletes a project and then the next test tries to get the group that includes the project, GitLab will return error 500 if a project relation has been deleted (e.g., Project Feature) but the project itself hasn't been deleted yet.
This is unlikely to be a problem for users unless one makes a request at exactly the same time as a project is deleted. And if they do it should be fine after refreshing the browser page.
Screenshots or screen recordings
There's no new output on success, but if the resource doesn't get deleted before the timeout the test will fail like this:
Failure/Error: project.remove_via_api!
QA::Support::Repeater::RetriesExceededError:
Waiting for QA::Resource::Project to be removed failed after 3 attempts
How to set up and validate locally
Run any test that removes a project when it's complete.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.