mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Stablize the multisite tests.
SiteSettingExtension triggers message bus which re-establishes a DB connection in `SiteSettingExtension#process_message`. That happens concurrently and a test that requires a connection to the db will fail when the reconnection is happening.
This commit is contained in:
11
spec/support/site_settings_helpers.rb
Normal file
11
spec/support/site_settings_helpers.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
module SiteSettingsHelpers
|
||||
def new_settings(provider)
|
||||
Class.new do
|
||||
extend SiteSettingExtension
|
||||
# we want to avoid leaking a big pile of MessageBus subscriptions here (1 per class)
|
||||
# so we set listen_for_changes to false
|
||||
self.listen_for_changes = false
|
||||
self.provider = provider
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user