Skip to content

Commit 4730000

Browse files
authored
Merge pull request rails#51178 from fatkodima/fix-flaky-multi_db_migrator-test
Fix flaky `multi_db_migrator_test.rb` test
2 parents b6285e9 + 5db70c9 commit 4730000

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

activerecord/test/cases/multi_db_migrator_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def test_migrator_db_has_no_schema_migrations_table
160160
assert_not @pool_a.connection.table_exists?("schema_migrations")
161161
migrator.migrate(1)
162162
assert @pool_a.connection.table_exists?("schema_migrations")
163+
migrator.rollback
163164

164165
_, migrator = migrator_class(3)
165166
migrator = migrator.new(@path_b, @schema_migration_b, @internal_metadata_b)
@@ -168,6 +169,7 @@ def test_migrator_db_has_no_schema_migrations_table
168169
assert_not @pool_b.connection.table_exists?("schema_migrations")
169170
migrator.migrate(1)
170171
assert @pool_b.connection.table_exists?("schema_migrations")
172+
migrator.rollback
171173
end
172174

173175
def test_migrator_forward

0 commit comments

Comments
 (0)