diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-07 06:11:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-07 06:11:02 +0300 |
commit | 66664611361dcfcbaf99cd7c6906b99bcb16becd (patch) | |
tree | 0b0c6b2266d5e6ea24e996cf7f5cf06ad523d9df /spec/lib/gitlab/database/lock_writes_manager_spec.rb | |
parent | 7e89568aa1b1c531aa34860fbd9e77d9e988b9b2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/database/lock_writes_manager_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database/lock_writes_manager_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/database/lock_writes_manager_spec.rb b/spec/lib/gitlab/database/lock_writes_manager_spec.rb index b1cc8add55a..242b2040eaa 100644 --- a/spec/lib/gitlab/database/lock_writes_manager_spec.rb +++ b/spec/lib/gitlab/database/lock_writes_manager_spec.rb @@ -37,6 +37,14 @@ RSpec.describe Gitlab::Database::LockWritesManager do it 'returns true for a table that is locked for writes' do expect { subject.lock_writes }.to change { subject.table_locked_for_writes?(test_table) }.from(false).to(true) end + + context 'for detached partition tables in another schema' do + let(:test_table) { 'gitlab_partitions_dynamic._test_table_20220101' } + + it 'returns true for a table that is locked for writes' do + expect { subject.lock_writes }.to change { subject.table_locked_for_writes?(test_table) }.from(false).to(true) + end + end end describe '#lock_writes' do |