mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 02:24:54 +08:00
DEV: Raise an error if thread doesn't return within expected time.
This commit is contained in:
parent
f3afc0cf76
commit
81b99efc68
@ -40,9 +40,12 @@ describe ActiveRecord::ConnectionHandling do
|
||||
postgresql_fallback_handler.setup!
|
||||
Discourse.disable_readonly_mode(Discourse::PG_READONLY_MODE_KEY)
|
||||
ActiveRecord::Base.unstub(:postgresql_connection)
|
||||
ActiveRecord::Base.establish_connection
|
||||
|
||||
(Thread.list - @threads).each { |thread| thread.join(5) }
|
||||
(Thread.list - @threads).each do |thread|
|
||||
raise "Thread still running" unless thread.join(5)
|
||||
end
|
||||
|
||||
ActiveRecord::Base.establish_connection
|
||||
end
|
||||
|
||||
describe "#postgresql_fallback_connection" do
|
||||
|
Loading…
x
Reference in New Issue
Block a user