diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-04 09:10:17 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-04 09:15:45 +0900 |
commit | 1f235a69a37e1df3b08ed2c39cd0086d9c4cfdb7 (patch) | |
tree | ebdf1395364707f1aaa8f0d708668a5349e85994 /activerecord/test/cases/tasks/database_tasks_test.rb | |
parent | 4ecca4cd05b2780ba08df951c8cde437feb1ba5b (diff) | |
download | rails-1f235a69a37e1df3b08ed2c39cd0086d9c4cfdb7.tar.gz rails-1f235a69a37e1df3b08ed2c39cd0086d9c4cfdb7.tar.bz2 rails-1f235a69a37e1df3b08ed2c39cd0086d9c4cfdb7.zip |
Don't drop internal metadata tables
Some tests expects that internal metadata tables exists, and we should
not use `create_table` in transactional tests, since DDL in MySQL causes
implicit commit.
https://travis-ci.org/rails/rails/jobs/515438937#L3829
Diffstat (limited to 'activerecord/test/cases/tasks/database_tasks_test.rb')
-rw-r--r-- | activerecord/test/cases/tasks/database_tasks_test.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/test/cases/tasks/database_tasks_test.rb b/activerecord/test/cases/tasks/database_tasks_test.rb index d6147dfe5f..dd4a0b0455 100644 --- a/activerecord/test/cases/tasks/database_tasks_test.rb +++ b/activerecord/test/cases/tasks/database_tasks_test.rb @@ -50,7 +50,6 @@ module ActiveRecord protected_environments = ActiveRecord::Base.protected_environments current_env = ActiveRecord::Base.connection.migration_context.current_environment - InternalMetadata.create_table InternalMetadata[:environment] = current_env assert_called_on_instance_of( @@ -77,7 +76,6 @@ module ActiveRecord protected_environments = ActiveRecord::Base.protected_environments current_env = ActiveRecord::Base.connection.migration_context.current_environment - InternalMetadata.create_table InternalMetadata[:environment] = current_env assert_called_on_instance_of( @@ -966,8 +964,8 @@ module ActiveRecord end def teardown - SchemaMigration.drop_table - InternalMetadata.drop_table + SchemaMigration.delete_all + InternalMetadata.delete_all ActiveRecord::Base.connection_handlers = { writing: ActiveRecord::Base.default_connection_handler } end |