From e2d8f1844de4e9c8f9eba79ce98d62fa6c901b7c Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Wed, 28 Jun 2017 17:23:55 +0900 Subject: 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 --- activerecord/test/cases/query_cache_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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({}) } -- cgit v1.2.3