7709: Fix state leaking between test suites.
authorTom Clegg <tom@curoverse.com>
Thu, 23 Mar 2017 20:07:36 +0000 (16:07 -0400)
committerTom Clegg <tom@curoverse.com>
Mon, 27 Mar 2017 16:49:32 +0000 (12:49 -0400)
services/api/test/integration/database_reset_test.rb
services/api/test/test_helper.rb

index 029e37cbbfed18075a73785ce1b565d5907202cd..a9b64b335fe422b88467ba2ddbab96fac2b6c62e 100644 (file)
@@ -1,8 +1,6 @@
 require 'test_helper'
 
 class DatabaseResetTest < ActionDispatch::IntegrationTest
-  self.use_transactional_fixtures = false
-
   slow_test "reset fails when Rails.env != 'test'" do
     rails_env_was = Rails.env
     begin
index 40292c230a43dc9dc12704943c00e990ba4386d8..0919985a9f6337b0452c71aa42d26e8dfe24acd2 100644 (file)
@@ -50,10 +50,6 @@ class ActiveSupport::TestCase
   include ArvadosTestSupport
   include CurrentApiClient
 
-  setup do
-    Rails.logger.warn "\n\n#{'=' * 70}\n#{self.class}\##{method_name}\n#{'-' * 70}\n\n"
-  end
-
   teardown do
     Thread.current[:api_client_ip_address] = nil
     Thread.current[:api_client_authorization] = nil
@@ -61,6 +57,7 @@ class ActiveSupport::TestCase
     Thread.current[:api_client] = nil
     Thread.current[:user] = nil
     restore_configuration
+    User.invalidate_permissions_cache
   end
 
   def assert_not_allowed