FIX: more flaky jobs_base_spec.rb (#8259)

This commit is follow up of 417be323a2

We need more steps to properly switch from multi-site to single-site
This commit is contained in:
Krzysztof Kotlarek 2019-10-29 21:32:43 +11:00 committed by GitHub
parent 1531644288
commit c5bcad10a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -111,8 +111,10 @@ xdescribe BackupRestore::Restorer do
described_class.any_instance.stubs(initialize_state: true) described_class.any_instance.stubs(initialize_state: true)
end end
after do after do
ActiveRecord::Base.clear_all_connections!
Rails.configuration.multisite = false
RailsMultisite::ConnectionManagement.clear_settings! RailsMultisite::ConnectionManagement.clear_settings!
conn.establish_connection(db: 'default') ActiveRecord::Base.establish_connection
end end
let(:conn) { RailsMultisite::ConnectionManagement } let(:conn) { RailsMultisite::ConnectionManagement }
let(:restorer) { described_class.new(admin.id) } let(:restorer) { described_class.new(admin.id) }