14873: Fixes unit tests.
[arvados.git] / services / api / test / unit / crunch_dispatch_test.rb
index 3460abe3cc6c50ac4e2f1a40fbbe2acb22350c0b..42ef0d160cb1c595f781858cb9137a79d88e1da0 100644 (file)
@@ -79,17 +79,6 @@ class CrunchDispatchTest < ActiveSupport::TestCase
     begin
       pid = Process.fork do
         begin
-          # Abandon database connections inherited from parent
-          # process.  Credit to
-          # https://github.com/kstephens/rails_is_forked
-          ActiveRecord::Base.connection_handler.connection_pools.each_value do |pool|
-            pool.instance_eval do
-              @reserved_connections = {}
-              @connections = []
-            end
-          end
-          ActiveRecord::Base.establish_connection
-
           dispatch = CrunchDispatch.new
           dispatch.stubs(:did_recently).returns true
           dispatch.run []