You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failure:
MigrationTest#test_migrator_one_up_with_unavailable_lock_using_run [/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:690]:
ActiveRecord::ConcurrentMigrationError expected but nothing was raised.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:676
Failure:
MigrationTest#test_with_advisory_lock_raises_the_right_error_when_it_fails_to_release_lock [/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:702]:
ActiveRecord::ConcurrentMigrationError expected but nothing was raised.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:697
Failure:
MigrationTest#test_create_table_with_query [/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:526]:
Expected: 1
Actual: 2
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:521
Failure:
MigrationTest#test_add_table_with_decimals [/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:196]:
Expected 0.6e10 to be a kind of Integer, not BigDecimal.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:170
Failure:
MigrationTest#test_migrator_one_up_with_unavailable_lock [/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:669]:
ActiveRecord::ConcurrentMigrationError expected but nothing was raised.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:655
Failure:
MigrationTest#test_create_table_with_query_from_relation [/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:537]:
Expected: 1
Actual: 2
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:532
Failure:
BulkAlterTableMigrationsTest#test_removing_columns [/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:836]:
Expected false to be truthy.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:822
Error:
BulkAlterTableMigrationsTest#test_adding_indexes:
RuntimeError: need an expected query count for CockroachDBAdapter
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:852:in `block in test_adding_indexes'
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:851:in `fetch'
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:851:in `test_adding_indexes'
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:840
Error:
BulkAlterTableMigrationsTest#test_changing_columns:
RuntimeError: need an expected query count for CockroachDBAdapter
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:914:in `block in test_changing_columns'
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:913:in `fetch'
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:913:in `test_changing_columns'
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:900
Error:
BulkAlterTableMigrationsTest#test_adding_multiple_columns:
RuntimeError: need an expected query count for CockroachDBAdapter
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:803:in `block in test_adding_multiple_columns'
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:802:in `fetch'
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:802:in `test_adding_multiple_columns'
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:797
Failure:
BulkAlterTableMigrationsTest#test_removing_index [/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:877]:
Expected nil to be truthy.
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:871
Error:
ExplicitlyNamedIndexMigrationTest#test_drop_index_by_name:
ArgumentError: No indexes found on values with the options provided.
/Users/alimi/repos/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb:1246:in `index_name_for_remove'
/Users/alimi/repos/rails/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb:485:in `remove_index'
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:777:in `block in test_drop_index_by_name'
/Users/alimi/repos/rails/activesupport/lib/active_support/testing/assertions.rb:32:in `assert_nothing_raised'
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:775:in `test_drop_index_by_name'
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:769
Error:
ReservedWordsMigrationTest#test_drop_index_from_table_named_values:
ArgumentError: No indexes found on values with the options provided.
/Users/alimi/repos/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb:1246:in `index_name_for_remove'
/Users/alimi/repos/rails/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb:485:in `remove_index'
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:761:in `block in test_drop_index_from_table_named_values'
/Users/alimi/repos/rails/activesupport/lib/active_support/testing/assertions.rb:32:in `assert_nothing_raised'
/Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:759:in `test_drop_index_from_table_named_values'
bin/rails test Users/alimi/repos/rails/activerecord/test/cases/migration_test.rb:753
Add a ruby file to test/excludes that matches the name of the test class if one doesn't already exist. For example to exclude a test from ActiveRecord::AdapterTest, create test/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_indexes from ActiveRecord::AdapterTest:
exclude:test_indexes,"Rails transactional tests are being used while making schema changes. See https://www.cockroachlabs.com/docs/stable/online-schema-changes.html#limited-support-for-schema-changes-within-transactions."
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 the CockroachDB module to avoid name collisions. See test/cases/adapter_test.rb for an example.
See the Contributing Guide for instructions on running tests.
If the test isn't valid against CockroachDB
test/excludes
that 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
.test_indexes
fromActiveRecord::AdapterTest
:activerecord-cockroachdb-adapter/test/excludes/ActiveRecord/AdapterTest.rb
Line 1 in c3cb637
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 theCockroachDB
module to avoid name collisions. Seetest/cases/adapter_test.rb
for an example.See #48.
The text was updated successfully, but these errors were encountered: