@@ -1948,19 +1948,6 @@ class SchemaCacheTest < ActiveRecord::TestCase
1948
1948
# Tests fail on Windows AppVeyor CI with 'Permission denied' error when renaming file during `File.atomic_write` call.
1949
1949
coerce_tests! :test_yaml_dump_and_load , :test_yaml_dump_and_load_with_gzip if RbConfig ::CONFIG [ "host_os" ] =~ /mswin|mingw/
1950
1950
1951
- # Ruby 2.5 and 2.6 have issues to marshal Time before 1900. 2012.sql has one column with default value 1753
1952
- coerce_tests! :test_marshal_dump_and_load_with_gzip , :test_marshal_dump_and_load_via_disk
1953
-
1954
- # Tests fail on Windows AppVeyor CI with 'Permission denied' error when renaming file during `File.atomic_write` call.
1955
- unless RbConfig ::CONFIG [ "host_os" ] =~ /mswin|mingw/
1956
- def test_marshal_dump_and_load_with_gzip_coerced
1957
- with_marshable_time_defaults { original_test_marshal_dump_and_load_with_gzip }
1958
- end
1959
- def test_marshal_dump_and_load_via_disk_coerced
1960
- with_marshable_time_defaults { original_test_marshal_dump_and_load_via_disk }
1961
- end
1962
- end
1963
-
1964
1951
# Cast type in SQL Server is :varchar rather than Unicode :string.
1965
1952
coerce_tests! :test_yaml_load_8_0_dump_without_cast_type_still_get_the_right_one
1966
1953
def test_yaml_load_8_0_dump_without_cast_type_still_get_the_right_one
@@ -1977,25 +1964,6 @@ def test_yaml_load_8_0_dump_without_cast_type_still_get_the_right_one
1977
1964
1978
1965
private
1979
1966
1980
- def with_marshable_time_defaults
1981
- # Detect problems
1982
- if Gem ::Version . new ( RUBY_VERSION ) < Gem ::Version . new ( "2.7" )
1983
- column = @connection . columns ( :sst_datatypes ) . find { |c | c . name == "datetime" }
1984
- current_default = column . default if column . default . is_a? ( Time ) && column . default . year < 1900
1985
- end
1986
-
1987
- # Correct problems
1988
- if current_default . present?
1989
- @connection . change_column_default ( :sst_datatypes , :datetime , current_default . dup . change ( year : 1900 ) )
1990
- end
1991
-
1992
- # Run original test
1993
- yield
1994
- ensure
1995
- # Revert changes
1996
- @connection . change_column_default ( :sst_datatypes , :datetime , current_default ) if current_default . present?
1997
- end
1998
-
1999
1967
# We need to give the full paths for this to work.
2000
1968
undef_method :schema_dump_5_1_path
2001
1969
def schema_dump_5_1_path
0 commit comments