Skip to content

Commit

Permalink
Fix random failure related to migration environment
Browse files Browse the repository at this point in the history
- Reference: https://travis-ci.org/rails/rails/jobs/189764676

- Reproduction command:

    MTB_VERBOSE=2 bundle exec minitest_bisect --seed 33328 -Itest "test/cases/migration_test.rb" "test/cases/tasks/database_tasks_test.rb"

- You need to also add minitest_bisect gem to the Gemfile to reproduce
  this failure.
  • Loading branch information
prathamesh-sonpatki committed Jan 7, 2017
1 parent 7b13236 commit 33191e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions activerecord/test/cases/migration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ def test_internal_metadata_stores_environment
ActiveRecord::Migrator.migrations_paths = old_path
ENV["RAILS_ENV"] = original_rails_env
ENV["RACK_ENV"] = original_rack_env
ActiveRecord::Migrator.up(migrations_path)
end

def test_migration_sets_internal_metadata_even_when_fully_migrated
Expand All @@ -425,6 +426,7 @@ def test_migration_sets_internal_metadata_even_when_fully_migrated
ActiveRecord::Migrator.migrations_paths = old_path
ENV["RAILS_ENV"] = original_rails_env
ENV["RACK_ENV"] = original_rack_env
ActiveRecord::Migrator.up(migrations_path)
end

def test_internal_metadata_stores_environment_when_other_data_exists
Expand Down

0 comments on commit 33191e2

Please sign in to comment.