From 3d89b16423bbce199fad8db72ffd4074eca59f9b Mon Sep 17 00:00:00 2001 From: Aidan Haran Date: Thu, 29 Apr 2021 11:02:35 +0100 Subject: [PATCH] Original Rails test fails on Windows CI because the dump file was not being binary read --- test/cases/coerced_tests.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/cases/coerced_tests.rb b/test/cases/coerced_tests.rb index 9e0e660f8..e2d740786 100644 --- a/test/cases/coerced_tests.rb +++ b/test/cases/coerced_tests.rb @@ -1270,6 +1270,16 @@ def test_does_not_duplicate_optimizer_hints_on_merge_coerced query = Post.optimizer_hints("OMGHINT").merge(Post.optimizer_hints("OMGHINT")).to_sql assert_equal expected, query end + + # Original Rails test fails on Windows CI because the dump file was not being binary read. + coerce_tests! :test_marshal_load_legacy_relation + def test_marshal_load_legacy_relation_coerced + path = File.expand_path( + "support/marshal_compatibility_fixtures/legacy_relation.dump", + ARTest::SQLServer.root_activerecord_test + ) + assert_equal 11, Marshal.load(File.binread(path)).size + end end end