Commit 82f18eab authored by Lin Jen-Shin's avatar Lin Jen-Shin

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.
parent 73a913f2
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment