mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
FIX: flaky jobs_base_spec.rb (#8258)
I was searching for a reason for randomly failing jobs_base_spec.rb. The reason was that after restorer_spec, the database is not restored to default. After restorer spec RailsMultisite::ConnectionManagement.all_dbs is returning array of ['default', 'second'] Then base job execution is evaluated twice ``` dbs = RailsMultisite::ConnectionManagement.all_dbs dbs.each do |db| execute(opts) end ```
This commit is contained in:
parent
492742837e
commit
417be323a2
|
@ -110,6 +110,7 @@ describe BackupRestore::Restorer do
|
|||
described_class.any_instance.stubs(initialize_state: true)
|
||||
end
|
||||
after do
|
||||
RailsMultisite::ConnectionManagement.clear_settings!
|
||||
conn.establish_connection(db: 'default')
|
||||
end
|
||||
let(:conn) { RailsMultisite::ConnectionManagement }
|
||||
|
|
Loading…
Reference in New Issue
Block a user