@@ -768,11 +768,6 @@ def test_sqlserver_structure_load
768768 end
769769 end
770770
771- class DatabaseTasksDumpSchemaCacheTest < ActiveRecord ::TestCase
772- # Skip this test with /tmp/my_schema_cache.yml path on Windows.
773- coerce_tests! :test_dump_schema_cache if RbConfig ::CONFIG [ "host_os" ] =~ /mswin|mingw/
774- end
775-
776771 class DatabaseTasksCreateAllTest < ActiveRecord ::TestCase
777772 # We extend `local_database?` so that common VM IPs can be used.
778773 coerce_tests! :test_ignores_remote_databases , :test_warning_for_remote_databases
@@ -1524,13 +1519,20 @@ def test_statement_cache_values_differ_coerced
15241519module ActiveRecord
15251520 module ConnectionAdapters
15261521 class SchemaCacheTest < ActiveRecord ::TestCase
1522+ # Tests fail on Windows AppVeyor CI with 'Permission denied' error when renaming file during `File.atomic_write` call.
1523+ coerce_tests! :test_yaml_dump_and_load , :test_yaml_dump_and_load_with_gzip if RbConfig ::CONFIG [ "host_os" ] =~ /mswin|mingw/
1524+
15271525 # Ruby 2.5 and 2.6 have issues to marshal Time before 1900. 2012.sql has one column with default value 1753
15281526 coerce_tests! :test_marshal_dump_and_load_with_gzip , :test_marshal_dump_and_load_via_disk
1529- def test_marshal_dump_and_load_with_gzip_coerced
1530- with_marshable_time_defaults { original_test_marshal_dump_and_load_with_gzip }
1531- end
1532- def test_marshal_dump_and_load_via_disk_coerced
1533- with_marshable_time_defaults { original_test_marshal_dump_and_load_via_disk }
1527+
1528+ # Tests fail on Windows AppVeyor CI with 'Permission denied' error when renaming file during `File.atomic_write` call.
1529+ unless RbConfig ::CONFIG [ "host_os" ] =~ /mswin|mingw/
1530+ def test_marshal_dump_and_load_with_gzip_coerced
1531+ with_marshable_time_defaults { original_test_marshal_dump_and_load_with_gzip }
1532+ end
1533+ def test_marshal_dump_and_load_via_disk_coerced
1534+ with_marshable_time_defaults { original_test_marshal_dump_and_load_via_disk }
1535+ end
15341536 end
15351537
15361538 private
0 commit comments