Skip to content

Commit 22c75b5

Browse files
committed
Postgres, fix excludes to be able so own AR tests run to completion
1 parent b73167f commit 22c75b5

File tree

11 files changed

+10
-13
lines changed

11 files changed

+10
-13
lines changed

test/rails/excludes/postgresql/ActiveRecord/ConnectionAdapters/PostgreSQLAdapterTest.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
if ActiveRecord::Base.connection.prepared_statements
2-
end
3-
41
# moved from above because they appear to be running even when prepared statements are not enabled
52
exclude :test_exec_with_binds, 'it uses $1 for parameter mapping which is not currently supported'
63
exclude :test_exec_typecasts_bind_vals, 'it uses $1 for parameter mapping which is not currently supported'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if ActiveRecord::Base.connection.database_version < 90500
1+
if ActiveRecord::Base.lease_connection.database_version < 90500
22
exclude :test_add_index_which_already_exists_does_not_raise_error_with_option, 'ADD INDEX IF NOT EXISTS is PG >= 9.5'
33
exclude :test_add_index_with_if_not_exists_matches_exact_index, 'ADD INDEX IF NOT EXISTS is PG >= 9.5'
44
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exclude :test_prepared_statement_status_is_thread_and_instance_specific, 'test expects prepared_statements to be on for postgres' unless ActiveRecord::Base.connection.prepared_statements
1+
exclude :test_prepared_statement_status_is_thread_and_instance_specific, 'test expects prepared_statements to be on for postgres' unless ActiveRecord::Base.lease_connection.prepared_statements
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exclude :test_preloading_too_many_ids, "works only with PS, fails in plain AR with MRI too" unless ActiveRecord::Base.connection.prepared_statements
1+
exclude :test_preloading_too_many_ids, "works only with PS, fails in plain AR with MRI too" unless ActiveRecord::Base.lease_connection.prepared_statements
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
if ActiveRecord::Base.connection.database_version < 90500
1+
if ActiveRecord::Base.lease_connection.database_version < 90500
22
exclude :test_create_table_with_indexes_and_if_not_exists_true, 'ADD INDEX IF NOT EXISTS is PG >= 9.5'
33
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exclude :test_lock_sending_custom_lock_statement, 'AR looks for $1 when we use ?' if ActiveRecord::Base.connection.prepared_statements
1+
exclude :test_lock_sending_custom_lock_statement, 'AR looks for $1 when we use ?' if ActiveRecord::Base.lease_connection.prepared_statements
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if ActiveRecord::Base.connection.prepared_statements
1+
if ActiveRecord::Base.lease_connection.prepared_statements
22
exclude :test_explain_with_eager_loading, 'test checks for $1 instead of ? when using prepared statements'
33
exclude :test_explain_for_one_query, 'test checks for $1 instead of ? when using prepared statements'
44
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exclude :test_composite_mapping, 'We cannot support composite types without type information. See #880' if ActiveRecord::Base.connection.prepared_statements
1+
exclude :test_composite_mapping, 'We cannot support composite types without type information. See #880' if ActiveRecord::Base.lease_connection.prepared_statements
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
if ActiveRecord::Base.connection.database_version < 90500
1+
if ActiveRecord::Base.lease_connection.database_version < 90500
22
exclude :test_pretty_print, 'fails with PG < 9.5'
33
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exclude :test_insert_all, 'Only works for PostgreSQL >= 9.5' unless ActiveRecord::Base.connection.supports_insert_on_duplicate_skip?
1+
exclude :test_insert_all, 'Only works for PostgreSQL >= 9.5' unless ActiveRecord::Base.lease_connection.supports_insert_on_duplicate_skip?

0 commit comments

Comments
 (0)