DEV: Include the thread in the error message.

This commit is contained in:
Guo Xiang Tan 2018-08-31 13:44:56 +08:00
parent 6ada825a4d
commit ae2f00ee73
1 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,9 @@ describe ActiveRecord::ConnectionHandling do
ActiveRecord::Base.unstub(:postgresql_connection)
(Thread.list - @threads).each do |thread|
raise "Thread still running" unless thread.join(5)
unless thread.join(5)
raise "Thread still running: #{thread}"
end
end
ActiveRecord::Base.establish_connection