Commit d15bf48e authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix project table lock leaking to other tests

We resume the fiber if it's still alive because some tests under this
context do not call resume and a dangling fiber would mean that the
projects table will still be locked
parent 8e39f635
...@@ -54,6 +54,10 @@ RSpec.describe Gitlab::Database::WithLockRetries do ...@@ -54,6 +54,10 @@ RSpec.describe Gitlab::Database::WithLockRetries do
lock_fiber.resume # start the transaction and lock the table lock_fiber.resume # start the transaction and lock the table
end end
after do
lock_fiber.resume if lock_fiber.alive?
end
context 'lock_fiber' do context 'lock_fiber' do
it 'acquires lock successfully' do it 'acquires lock successfully' do
check_exclusive_lock_query = """ check_exclusive_lock_query = """
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'rake_helper' require 'rake_helper'
RSpec.describe 'gitlab:pages:migrate_legacy_storagerake task', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/300123' do RSpec.describe 'gitlab:pages:migrate_legacy_storagerake task' do
before(:context) do before(:context) do
Rake.application.rake_require 'tasks/gitlab/pages' Rake.application.rake_require 'tasks/gitlab/pages'
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment