aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2016-02-12 19:46:03 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2016-02-12 19:46:03 +0530
commit33b0dbe40729ba130c3c83391a3d9581c2a8b034 (patch)
treefb52d6a3e9513f7b4a436e06e991c2ce1d3cbf4a /activerecord
parent5d643d365ee656ff93517c649578545c7cc280c3 (diff)
downloadrails-33b0dbe40729ba130c3c83391a3d9581c2a8b034.tar.gz
rails-33b0dbe40729ba130c3c83391a3d9581c2a8b034.tar.bz2
rails-33b0dbe40729ba130c3c83391a3d9581c2a8b034.zip
Fix random failures of tests on Travis
- Tests on Travis are randomly failing because schema_migrations table does not exist in teardown block. - Also checked that all other places where we have used `ActiveRecord::SchemaMigration.delete_all` we have rescued it, so used it here also. This failure was not specifically related to the test added in this PR but to overall compatibility migration tests, so adding as separate commit.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/migration/compatibility_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/migration/compatibility_test.rb b/activerecord/test/cases/migration/compatibility_test.rb
index d8f5b33542..60ca90464d 100644
--- a/activerecord/test/cases/migration/compatibility_test.rb
+++ b/activerecord/test/cases/migration/compatibility_test.rb
@@ -21,7 +21,7 @@ module ActiveRecord
teardown do
connection.drop_table :testings rescue nil
ActiveRecord::Migration.verbose = @verbose_was
- ActiveRecord::SchemaMigration.delete_all
+ ActiveRecord::SchemaMigration.delete_all rescue nil
end
def test_migration_doesnt_remove_named_index