Skip to content

Commit 945c3cd

Browse files
authored
Merge pull request rails#28187 from kamipo/fix_intermittent_test_failure
Fix `test_apply_distinct_in_count` failure in PG adapter
2 parents 385799a + 45c5e26 commit 945c3cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

activerecord/test/cases/calculations_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ def test_apply_distinct_in_count
234234
end
235235

236236
queries.each do |query|
237+
# `table_alias_length` in `column_alias_for` would execute
238+
# "SHOW max_identifier_length" statement in PostgreSQL adapter.
239+
next if query == "SHOW max_identifier_length"
237240
assert_match %r{\ASELECT(?! DISTINCT) COUNT\(DISTINCT\b}, query
238241
end
239242
end

0 commit comments

Comments
 (0)