aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2017-01-07 17:45:33 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2017-01-07 17:45:33 +0530
commit33191e2079ff5027cb89d27bbc2b6a4e67f9afaf (patch)
tree7dd05e42a215ef4ace4200880ee76a1c20a3ee31 /activerecord/test
parent7b13236818ffb26e94d72885e75966efffd71659 (diff)
downloadrails-33191e2079ff5027cb89d27bbc2b6a4e67f9afaf.tar.gz
rails-33191e2079ff5027cb89d27bbc2b6a4e67f9afaf.tar.bz2
rails-33191e2079ff5027cb89d27bbc2b6a4e67f9afaf.zip
Fix random failure related to migration environment
- 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.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/migration_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 1602b3f757..4edb807bbb 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -399,6 +399,7 @@ class MigrationTest < ActiveRecord::TestCase
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
@@ -425,6 +426,7 @@ class MigrationTest < ActiveRecord::TestCase
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