You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Original Rails test fails with SQL Server error message "The query processor ran out of internal resources and
1630
+
# could not produce a query plan". This error goes away if you change database compatibility level to 110 (SQL 2012)
1631
+
# (see https://www.mssqltips.com/sqlservertip/5279/sql-server-error-query-processor-ran-out-of-internal-resources-and-could-not-produce-a-query-plan/).
1632
+
# However, you cannot change the compatibility level during a test. The purpose of the test is to ensure that an
1633
+
# unprepared statement is used if the number of values exceeds the adapter's `bind_params_length`. The coerced test
1634
+
# still does this as there will be 32,768 remaining citation records in the database and the `bind_params_length` of
1635
+
# adapter is 2,098.
1636
+
coerce_tests!:test_eager_loading_too_many_ids
1637
+
deftest_eager_loading_too_many_ids_coerced
1638
+
# Remove excess records.
1639
+
Citation.limit(32768).order(id: :desc).delete_all
1640
+
1641
+
# Perform test
1642
+
citation_count=Citation.count
1643
+
assert_sql(/WHERE \[citations\]\.\[id\] IN \(0, 1/)do
0 commit comments