summaryrefslogtreecommitdiff
path: root/spec/support/db_cleaner.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-19 18:10:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-19 18:10:06 +0000
commitb45b4fa37b88501538b4139ef9f2f2777414d630 (patch)
treec3de025a8db9ad2cfd056795bbded5054ad15261 /spec/support/db_cleaner.rb
parent2b5469a93eb16d5a24c02105e2251e65a75ba915 (diff)
downloadgitlab-ce-b45b4fa37b88501538b4139ef9f2f2777414d630.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/db_cleaner.rb')
-rw-r--r--spec/support/db_cleaner.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/spec/support/db_cleaner.rb b/spec/support/db_cleaner.rb
index 24cdbe04fc2..2a1302f971a 100644
--- a/spec/support/db_cleaner.rb
+++ b/spec/support/db_cleaner.rb
@@ -78,19 +78,6 @@ module DbCleaner
puts "Databases re-creation done in #{Gitlab::Metrics::System.monotonic_time - start}"
end
- def recreate_databases_and_seed_if_needed
- # Postgres maximum number of columns in a table is 1600 (https://github.com/postgres/postgres/blob/de41869b64d57160f58852eab20a27f248188135/src/include/access/htup_details.h#L23-L47).
- # We drop and recreate the database if any table has more than 1200 columns, just to be safe.
- return false unless any_connection_class_with_more_than_allowed_columns?
-
- recreate_all_databases!
-
- # Seed required data as recreating DBs will delete it
- TestEnv.seed_db
-
- true
- end
-
def force_disconnect_all_connections!
cmd = <<~SQL
SELECT pg_terminate_backend(pg_stat_activity.pid)