aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/hstore_test.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-03-09 15:52:27 -0600
committerSean Griffin <sean@thoughtbot.com>2015-03-09 15:52:27 -0600
commit761b5541b645bc1863b71008d6856eb1d2d46806 (patch)
tree00a4f46f4f023cf3dbd4648cd45a7ff6e5aa4d13 /activerecord/test/cases/adapters/postgresql/hstore_test.rb
parent2e4a01b92ca2165442c130071bd19af52d14d7cf (diff)
downloadrails-761b5541b645bc1863b71008d6856eb1d2d46806.tar.gz
rails-761b5541b645bc1863b71008d6856eb1d2d46806.tar.bz2
rails-761b5541b645bc1863b71008d6856eb1d2d46806.zip
Fix intermittent test failures
The table is being modified in tests, without reloading the column information on the appropriate class. This is leading to incorrect column information in many cases. The failures fixed by this commit can be replicated with: ARCONN=postgresql ruby -Itest test/cases/adapters/postgresql/hstore_test.rb --seed 21574
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/hstore_test.rb')
-rw-r--r--activerecord/test/cases/adapters/postgresql/hstore_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/hstore_test.rb b/activerecord/test/cases/adapters/postgresql/hstore_test.rb
index e6835031c3..ad9dd311a6 100644
--- a/activerecord/test/cases/adapters/postgresql/hstore_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/hstore_test.rb
@@ -27,6 +27,7 @@ if ActiveRecord::Base.connection.supports_extensions?
t.hstore 'settings'
end
end
+ Hstore.reset_column_information
@column = Hstore.columns_hash['tags']
@type = Hstore.type_for_attribute("tags")
end