summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-09-11 20:35:45 +0000
committerRobert Speicher <robert@gitlab.com>2017-09-11 20:35:45 +0000
commit715ee58199c95b42d6e7d1f1f876bf524bff0fbd (patch)
tree8d7b2bb920723ac7aa5643e9f184d6792b0d6f83
parent8a51771a3f5857251d4a255dfe81de7d81379160 (diff)
parent82f18eabf3cf5d035508fb23c3f7072f9c7d9a41 (diff)
downloadgitlab-ce-715ee58199c95b42d6e7d1f1f876bf524bff0fbd.tar.gz
Merge branch '37608-reset-all-connections' into 'master'
Reset all connection schema cache after migration tests See merge request !14195
-rw-r--r--spec/support/migrations_helpers.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/support/migrations_helpers.rb b/spec/support/migrations_helpers.rb
index 4ca019c1b05..6522d74ba89 100644
--- a/spec/support/migrations_helpers.rb
+++ b/spec/support/migrations_helpers.rb
@@ -16,7 +16,9 @@ module MigrationsHelpers
end
def reset_column_in_migration_models
- ActiveRecord::Base.clear_cache!
+ ActiveRecord::Base.connection_pool.connections.each do |conn|
+ conn.schema_cache.clear!
+ end
described_class.constants.sort.each do |name|
const = described_class.const_get(name)