aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-06-28 17:23:55 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-06-28 17:30:10 +0900
commite2d8f1844de4e9c8f9eba79ce98d62fa6c901b7c (patch)
tree9659e7691533aed37d2b4ca3f83d47e8e492c40b
parentd766b64b7e137955b7c7dbab51d2b6e525de47c1 (diff)
downloadrails-e2d8f1844de4e9c8f9eba79ce98d62fa6c901b7c.tar.gz
rails-e2d8f1844de4e9c8f9eba79ce98d62fa6c901b7c.tar.bz2
rails-e2d8f1844de4e9c8f9eba79ce98d62fa6c901b7c.zip
Show query cache keys in `test_exceptional_middleware_clears_and_disables_cache_on_error`
`test_exceptional_middleware_clears_and_disables_cache_on_error` in postgresql adapter sometime fails recently. Show the query cache keys to investigte the cause. https://travis-ci.org/rails/rails/jobs/246467252#L490-L493
-rw-r--r--activerecord/test/cases/query_cache_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb
index 9b741545d7..c2d40f2940 100644
--- a/activerecord/test/cases/query_cache_test.rb
+++ b/activerecord/test/cases/query_cache_test.rb
@@ -42,7 +42,8 @@ class QueryCacheTest < ActiveRecord::TestCase
mw = middleware { |env|
Task.find 1
Task.find 1
- assert_equal 1, ActiveRecord::Base.connection.query_cache.length
+ query_cache = ActiveRecord::Base.connection.query_cache
+ assert_equal 1, query_cache.length, query_cache.keys
raise "lol borked"
}
assert_raises(RuntimeError) { mw.call({}) }