Skip to content
Browse files

fix order dependent test

`ReflectionTest` uses column information in tests and those tests break
if tests are run in random order.
  • Loading branch information...
1 parent bffda1e commit 09beb9c292da55158b9f966bf3ae0a583e2bfe7b @neerajdotname neerajdotname committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 activerecord/test/cases/transactions_test.rb
5 activerecord/test/cases/transactions_test.rb
@@ -453,6 +453,11 @@ def test_sqlite_add_column_in_transaction
raise ActiveRecord::Rollback
+ ensure
+ Topic.reset_column_information # reset the column information to get correct reading
+ Topic.connection.remove_column('topics', 'stuff') if Topic.column_names.include?('stuff')
+ Topic.reset_column_information # reset the column information again for other tests
def test_transactions_state_from_rollback

0 comments on commit 09beb9c

Please sign in to comment.
Something went wrong with that request. Please try again.