Test of ActiveRecord connections in a multithreaded case