aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/query_cache_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-07-20 19:46:16 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-07-20 19:46:16 +0900
commit2ec207520389f4a6acb393be45bc73cc3815ad76 (patch)
tree4604e75046b9223e74adde1041761bd991f332f8 /activerecord/test/cases/query_cache_test.rb
parent526d4b8dc816c17e354e2e0243af16d10147c3f0 (diff)
downloadrails-2ec207520389f4a6acb393be45bc73cc3815ad76.tar.gz
rails-2ec207520389f4a6acb393be45bc73cc3815ad76.tar.bz2
rails-2ec207520389f4a6acb393be45bc73cc3815ad76.zip
Make `type_map` to private because it is only used in the connection adapter
`type_map` is an internal API and it is only used in the connection adapter. And also, some type map initializer methods requires passed `type_map`, but those instances already has `type_map` in itself. So we don't need explicit passing `type_map` to the initializers.
Diffstat (limited to 'activerecord/test/cases/query_cache_test.rb')
-rw-r--r--activerecord/test/cases/query_cache_test.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb
index b018a7b6c0..61ef6ad328 100644
--- a/activerecord/test/cases/query_cache_test.rb
+++ b/activerecord/test/cases/query_cache_test.rb
@@ -400,10 +400,8 @@ class QueryCacheTest < ActiveRecord::TestCase
# Warm the cache
Task.find(1)
- Task.connection.type_map.clear
-
# Preload the type cache again (so we don't have those queries issued during our assertions)
- Task.connection.send(:initialize_type_map, Task.connection.type_map)
+ Task.connection.send(:reload_type_map)
# Clear places where type information is cached
Task.reset_column_information