summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-09-11 20:35:45 +0000
committerJarka Kadlecova <jarka@gitlab.com>2017-09-12 13:04:03 +0200
commit5442739f938b8a89bf7f663d18a63c19710f7d97 (patch)
tree301912884d256e8ddc2e6fa7409a442884bb420c
parent2bd689cbbde4dd3443312478b75211d4acf7fe43 (diff)
downloadgitlab-ce-5442739f938b8a89bf7f663d18a63c19710f7d97.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)