From 5a8714e559dd4d4058d23bd0d427a9d3e6022617 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Thu, 13 Jun 2019 23:51:11 +0900 Subject: [PATCH] Ensure to reset migration version after testing migration "schema_migrations" table may be hard dropped before, so the reset migration version should be done in ensure block. https://buildkite.com/rails/rails/builds/61697#18d6f3ac-2257-4f4b-8efc-4010464c4d9a/999-1011 --- activerecord/test/cases/adapters/postgresql/uuid_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/test/cases/adapters/postgresql/uuid_test.rb b/activerecord/test/cases/adapters/postgresql/uuid_test.rb index 71b4d3298e..4b8aeb33f6 100644 --- a/activerecord/test/cases/adapters/postgresql/uuid_test.rb +++ b/activerecord/test/cases/adapters/postgresql/uuid_test.rb @@ -285,7 +285,6 @@ class PostgresqlUUIDGenerationTest < ActiveRecord::PostgreSQLTestCase uses_transaction \ def test_schema_dumper_for_uuid_primary_key_default_in_legacy_migration - ActiveRecord::SchemaMigration.delete_all @verbose_was = ActiveRecord::Migration.verbose ActiveRecord::Migration.verbose = false @@ -302,6 +301,7 @@ class PostgresqlUUIDGenerationTest < ActiveRecord::PostgreSQLTestCase ensure drop_table "pg_uuids_4" ActiveRecord::Migration.verbose = @verbose_was + ActiveRecord::SchemaMigration.delete_all end end @@ -335,7 +335,6 @@ class PostgresqlUUIDTestNilDefault < ActiveRecord::PostgreSQLTestCase uses_transaction \ def test_schema_dumper_for_uuid_primary_key_with_default_nil_in_legacy_migration - ActiveRecord::SchemaMigration.delete_all @verbose_was = ActiveRecord::Migration.verbose ActiveRecord::Migration.verbose = false @@ -352,6 +351,7 @@ class PostgresqlUUIDTestNilDefault < ActiveRecord::PostgreSQLTestCase ensure drop_table "pg_uuids_4" ActiveRecord::Migration.verbose = @verbose_was + ActiveRecord::SchemaMigration.delete_all end end