Fix order-dependent test failures
What does this MR do and why?
Prevent extra DB connection pools from leaking to succeeding tests and also improves our connection check initializer so that it works even with multiple connection pools for the same DB name.
Failure can be reproduced with:
bin/rspec "spec/tasks/gitlab/backup_rake_spec.rb" "spec/lib/initializer_connections_spec.rb"
Note that backup_rake_spec.rb
deletes the db/
directory so you need to checkout db/
from master
again if you want to re-run the specs. Already created a separate issue for this: #462975 (closed)
Related to #444963 (closed) #444962 (closed) #444961 (closed) #444960 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Heinrich Lee Yu