aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorLars Kanis <lars@greiz-reinsdorf.de>2018-07-12 07:08:36 +0200
committerLars Kanis <lars@greiz-reinsdorf.de>2019-01-26 20:30:43 +0100
commitc6d7e70be4bf4c52499cc94936e89943ed3478c8 (patch)
tree0a82e7c0cdd00932c38a66ae57b8128941dc6ac7 /activerecord/test
parentde0c705516cf8f15f70b47e35e4117bb9d4d537c (diff)
downloadrails-c6d7e70be4bf4c52499cc94936e89943ed3478c8.tar.gz
rails-c6d7e70be4bf4c52499cc94936e89943ed3478c8.tar.bz2
rails-c6d7e70be4bf4c52499cc94936e89943ed3478c8.zip
PostgreSQL: Use native timestamp decoders of pg-1.1
This improves performance of timestamp conversion and avoids additional string allocations.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/cache_key_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/cache_key_test.rb b/activerecord/test/cases/cache_key_test.rb
index 3a06b1c795..c27eb8a65d 100644
--- a/activerecord/test/cases/cache_key_test.rb
+++ b/activerecord/test/cases/cache_key_test.rb
@@ -51,7 +51,7 @@ module ActiveRecord
end
test "cache_version is the same when it comes from the DB or from the user" do
- skip("Mysql2 does not return a string value for updated_at") if current_adapter?(:Mysql2Adapter)
+ skip("Mysql2 and PostgreSQL don't return a string value for updated_at") if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter)
record = CacheMeWithVersion.create
record_from_db = CacheMeWithVersion.find(record.id)
@@ -63,7 +63,7 @@ module ActiveRecord
end
test "cache_version does not truncate zeros when timestamp ends in zeros" do
- skip("Mysql2 does not return a string value for updated_at") if current_adapter?(:Mysql2Adapter)
+ skip("Mysql2 and PostgreSQL don't return a string value for updated_at") if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter)
travel_to Time.now.beginning_of_day do
record = CacheMeWithVersion.create
@@ -84,7 +84,7 @@ module ActiveRecord
end
test "cache_version does NOT call updated_at when value is from the database" do
- skip("Mysql2 does not return a string value for updated_at") if current_adapter?(:Mysql2Adapter)
+ skip("Mysql2 and PostgreSQL don't return a string value for updated_at") if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter)
record = CacheMeWithVersion.create
record_from_db = CacheMeWithVersion.find(record.id)