Skip to content

Improve cleanup in DB library code tests

Krasimir Angelov requested to merge ka/fix/flaky-db-library-code-tests into master

What does this MR do and why?

This fixes the issue we found in !135866 (comment 1634828425), by adding additional test cleanup in after and before blocks.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. On current master execute
    bundle exec rspec spec/lib/gitlab/database/tables_locker_spec.rb spec/lib/gitlab/database/tables_truncate_spec.rb
    It should fail.
  2. On this branch, execute the same:
    bundle exec rspec spec/lib/gitlab/database/tables_locker_spec.rb spec/lib/gitlab/database/tables_truncate_spec.rb
    It should now 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