15275: Don't create snapshot when trashing collection.
[arvados.git] / services / api / test / unit / crunch_dispatch_test.rb
index 3460abe3cc6c50ac4e2f1a40fbbe2acb22350c0b..3a8f90a66b6705da6359cef0d59b49ef8db61996 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 []
@@ -110,7 +99,7 @@ class CrunchDispatchTest < ActiveSupport::TestCase
 
   test 'override --cgroup-root with CRUNCH_CGROUP_ROOT' do
     ENV['CRUNCH_CGROUP_ROOT'] = '/path/to/cgroup'
-    Rails.configuration.crunch_job_wrapper = :none
+    Rails.configuration.Containers.JobsAPI.CrunchJobWrapper = "none"
     act_as_system_user do
       j = Job.create(repository: 'active/foo',
                      script: 'hash',
@@ -151,7 +140,7 @@ class CrunchDispatchTest < ActiveSupport::TestCase
 
   test 'rate limit of partial line segments' do
     act_as_system_user do
-      Rails.configuration.crunch_log_partial_line_throttle_period = 1
+      Rails.configuration.Containers.Logging.LogPartialLineThrottlePeriod = 1
 
       job = {}
       job[:bytes_logged] = 0
@@ -208,7 +197,7 @@ class CrunchDispatchTest < ActiveSupport::TestCase
   end
 
   test 'scancel orphaned job nodes' do
-    Rails.configuration.crunch_job_wrapper = :slurm_immediate
+    Rails.configuration.Containers.JobsAPI.CrunchJobWrapper = "slurm_immediate"
     act_as_system_user do
       dispatch = CrunchDispatch.new