Skip to content

Commit 5e48b75

Browse files
committed
Reset parallel test tables by deleting
Fixed tests up to rails/rails@dcf0336
1 parent fe2d440 commit 5e48b75

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ gemspec
99
gem "bcrypt"
1010
gem "pg", "1.5.9"
1111
gem "sqlite3", ">= 2.1"
12-
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
12+
gem "tzinfo-data"
1313
gem "benchmark-ips"
1414
gem "minitest", "~> 6.0"
1515
gem "minitest-mock"

test/cases/coerced_tests.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def test_truncate_tables_coerced
163163
# SQL Server does not allow truncation of tables that are referenced by foreign key
164164
# constraints. So manually remove/add foreign keys in test.
165165
coerce_tests! :test_truncate_tables_with_query_cache
166-
def test_truncate_tables_with_query_cache
166+
def test_truncate_tables_with_query_cache_coerced
167167
# Remove foreign key constraint to allow truncation.
168168
@connection.remove_foreign_key :authors, :author_addresses
169169

@@ -185,6 +185,11 @@ def test_truncate_tables_with_query_cache
185185
# Restore foreign key constraint.
186186
@connection.add_foreign_key :authors, :author_addresses
187187
end
188+
189+
# SQL Server does not allow truncation of tables that are referenced by foreign key
190+
# constraints. As this test truncates all tables we would need to remove all foreign
191+
# key constraints and then restore them afterwards to get this test to pass.
192+
coerce_tests! :test_empty_all_tables, :test_empty_all_tables_with_query_cache
188193
end
189194
end
190195

@@ -2837,3 +2842,4 @@ def test_in_batches_loaded_should_unscope_cursor_after_pluck_coerced
28372842
end
28382843
end
28392844
end
2845+

0 commit comments

Comments
 (0)