Skip to content

Fix flaky test on bulk_delete_by_project_service

What does this MR do and why?

Flaky test issue: #444832 (comment 1936766858)

MR acceptance checklist

In some cases, the order of deleted artifact IDs could differ from expected.

To fix flakiness we have to ignore the order of deleted artifact IDs in the test.

This MR changes expectations to ignore the order of deleted artifacts ids in the test.

Example of failed test (https://gitlab.com/gitlab-org/gitlab-foss/-/jobs/6957861755):

 # ./spec/tasks/gitlab/db/decomposition/connection_status_rake_spec.rb:41
Failures:
  1) Ci::JobArtifacts::BulkDeleteByProjectService#execute #execute when requested not existing artifacts do delete fails to destroy
     Failure/Error: expect(result[:message]).to eq("Artifacts (#{deleted_job_artifacts.map(&:id).join(',')}) not found")
       expected: "Artifacts (27,28,26) not found"
            got: "Artifacts (26,27,28) not found"
Edited by Dmytro Biryukov

Merge request reports