activerecord-cockroachdb-adapter
activerecord-cockroachdb-adapter copied to clipboard
[ActiveRecord 5.2 Test Failure] test/cases/reload_models_test.rb
The test crashes for me locally. It might be related to an issue with forking, the pg gem, and macOS (see https://github.com/ged/ruby-pg/issues/311, and https://github.com/cockroachdb/activerecord-cockroachdb-adapter/pull/62#issuecomment-612914655). This test might pass on a different environment like CI.
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.
Any update on this failing test?
For me to convince our organisation to switch over to cockroachdb, it would be very helpful if most ActiveRecord tests where passing. Maybe this one isn't a big problem in practice, but the fact that a test named "reload modals" (a quite common operation in a rails application) isn't passing is somewhat alarming.
I'm not reproducing the crash on a MacBook Pro with M1 chip.
This is now working (the test is not failing nor in CI nor locally on my mac). Feel free to comment on this issue if you find a failing configuration