Reset all connection schema cache after migration tests
We might also want to consider reduce the number of connections in the tests. However I just tried setting it to 1 and that doesn't seem enough for feature tests.
This commit is contained in:
parent
73a913f2b5
commit
82f18eabf3
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue