Skip to content

Restore spec coverage for testing detached partitions lock writes

What does this MR do and why?

After a refactor, it turned out that some test cases were missing in the specs for Gitlab::Database::TablesLocker class.

This MR will bring back the missing test cases: ensure the detached partitions are properly locked for writes.

How to set up and validate locally

  • Comment out lines 66-70 of lib/gitlab/database/tables_locker.rb
  • Run specs: rspec spec/lib/gitlab/database/tables_locker_spec.rb
    • on master, this will pass
    • on this branch, this will fail
  • restore the lines 66-70 and run the specs again
    • on this branch, this will 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.

Related to #391638 (closed)

Edited by Rutger Wessels

Merge request reports

Loading