activerecord-cockroachdb-adapter
activerecord-cockroachdb-adapter copied to clipboard
[ActiveRecord 5.2 Test Failure] test/cases/adapters/postgresql/infinity_test.rb
Failure:
PostgresqlInfinityTest#test_update_all_with_infinity_on_a_datetime_column [/Users/alimi/repos/rails/activerecord/test/cases/adapters/postgresql/infinity_test.rb:70]:
--- expected
+++ actual
@@ -1 +1 @@
-Infinity
+-292277022365-05-08 08:17:07 UTC
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/adapters/postgresql/infinity_test.rb:66
Failure:
PostgresqlInfinityTest#test_update_all_with_infinity_on_a_float_column [/Users/alimi/repos/rails/activerecord/test/cases/adapters/postgresql/infinity_test.rb:43]:
Expected: Infinity
Actual: 0.0
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/adapters/postgresql/infinity_test.rb:39
Failure:
PostgresqlInfinityTest#test_type_casting_infinity_on_a_datetime_column [/Users/alimi/repos/rails/activerecord/test/cases/adapters/postgresql/infinity_test.rb:49]:
--- expected
+++ actual
@@ -1 +1 @@
-Infinity
+-292277022365-05-08 08:17:07 UTC
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/adapters/postgresql/infinity_test.rb:46
Failure:
PostgresqlInfinityTest#test_assigning_'infinity'_on_a_datetime_column_with_TZ_aware_attributes [/Users/alimi/repos/rails/activerecord/test/cases/adapters/postgresql/infinity_test.rb:78]:
--- expected
+++ actual
@@ -1 +1 @@
-Infinity
+-292277022365-05-08 08:17:07 UTC
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/adapters/postgresql/infinity_test.rb:73
Failure:
PostgresqlInfinityTest#test_type_casting_infinity_on_a_float_column [/Users/alimi/repos/rails/activerecord/test/cases/adapters/postgresql/infinity_test.rb:27]:
Expected: Infinity
Actual: 0.0
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/adapters/postgresql/infinity_test.rb:24
See the Contributing Guide for instructions on running tests.
If the test isn't valid against CockroachDB
- Add a ruby file to
test/excludesthat matches the name of the test class if one doesn't already exist. For example to exclude a test fromActiveRecord::AdapterTest, createtest/excludes/ActiveRecord/AdapterTest.rb. - Add an exclude statement to the file with the name of the test to exclude and a description. For example to exclude
test_indexesfromActiveRecord::AdapterTest: https://github.com/cockroachdb/activerecord-cockroachdb-adapter/blob/c3cb637bd855b36bbf9e76b7947162054b95022e/test/excludes/ActiveRecord/AdapterTest.rb#L1 - Finally, if the test can run against CockroachDB with a few changes, add it to
test/cases. Everything from the ActiveRecord test suite will be available, so a lot of the excluded test can be copied over. Namespace the test under theCockroachDBmodule to avoid name collisions. Seetest/cases/adapter_test.rbfor an example.
See https://github.com/cockroachdb/activerecord-cockroachdb-adapter/issues/48.