Commit 888d5ed4 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Close the advisory lock connection manually

When recreating the DB in migration tests, there may be connections
remaining from ActiveRecord::AdvisoryLockBase
parent a8acb24e
......@@ -35,6 +35,8 @@ RSpec.configure do |config|
puts "Recreating the database"
start = Gitlab::Metrics::System.monotonic_time
ActiveRecord::AdvisoryLockBase.clear_all_connections!
ActiveRecord::Tasks::DatabaseTasks.drop_current
ActiveRecord::Tasks::DatabaseTasks.create_current
ActiveRecord::Tasks::DatabaseTasks.load_schema_current
......
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