Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions test/cases/coerced_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -768,11 +768,6 @@ def test_sqlserver_structure_load
end
end

class DatabaseTasksDumpSchemaCacheTest < ActiveRecord::TestCase
# Skip this test with /tmp/my_schema_cache.yml path on Windows.
coerce_tests! :test_dump_schema_cache if RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
end

class DatabaseTasksCreateAllTest < ActiveRecord::TestCase
# We extend `local_database?` so that common VM IPs can be used.
coerce_tests! :test_ignores_remote_databases, :test_warning_for_remote_databases
Expand Down Expand Up @@ -1524,13 +1519,20 @@ def test_statement_cache_values_differ_coerced
module ActiveRecord
module ConnectionAdapters
class SchemaCacheTest < ActiveRecord::TestCase
# Tests fail on Windows AppVeyor CI with 'Permission denied' error when renaming file during `File.atomic_write` call.
coerce_tests! :test_yaml_dump_and_load, :test_yaml_dump_and_load_with_gzip if RbConfig::CONFIG["host_os"] =~ /mswin|mingw/

# Ruby 2.5 and 2.6 have issues to marshal Time before 1900. 2012.sql has one column with default value 1753
coerce_tests! :test_marshal_dump_and_load_with_gzip, :test_marshal_dump_and_load_via_disk
def test_marshal_dump_and_load_with_gzip_coerced
with_marshable_time_defaults { original_test_marshal_dump_and_load_with_gzip }
end
def test_marshal_dump_and_load_via_disk_coerced
with_marshable_time_defaults { original_test_marshal_dump_and_load_via_disk }

# Tests fail on Windows AppVeyor CI with 'Permission denied' error when renaming file during `File.atomic_write` call.
unless RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
def test_marshal_dump_and_load_with_gzip_coerced
with_marshable_time_defaults { original_test_marshal_dump_and_load_with_gzip }
end
def test_marshal_dump_and_load_via_disk_coerced
with_marshable_time_defaults { original_test_marshal_dump_and_load_via_disk }
end
end

private
Expand Down