Skip to content
Snippets Groups Projects

Skip Exclusive Lease Transaction Check for js specs

Merged Marc Shaw requested to merge skip_exclusive_lease_transaction_check_js_specs into master
All threads resolved!
@@ -42,6 +42,20 @@
expect { lease_attempt }.to raise_error(Gitlab::ExclusiveLease::LeaseWithinTransactionError)
end
end
it 'allows the operation if lock thread is set' do
described_class.skipping_transaction_check do
thread = Thread.new do
Thread.current.abort_on_exception = true
ApplicationRecord.transaction do
expect { lease_attempt }.not_to raise_error
end
end
thread.join
end
end
end
context 'in production environment' do
Loading