Commit db406bb
committed
fix(test): flaky encryption
Minimal set of test reproduction:
```sh
COCKROACH_SKIP_LOAD_SCHEMA=1 SEED=13092 bundle exec rake test TESTOPTS="--name='/\A("\
"test_concurrent_insert_with_processes"\
"|test_uniqueness_validations_work_when_using_old_encryption_schemes"\
"|test_fixtures_get_encrypted_automatically"\
"|test_ciphertext_for_returns_the_ciphertext_of_a_value_when_the_record_is_new)\z/'"
```
It is important NOT TO run `ActiveRecord::Base.reset_column_information`.
Some tests are eagerly loading information to prevent side effects [^1].
We could run `Avenger.reset_column_information` but we actually do not
need it here.
[^1]: See https://github.com/rails/rails/blob/v8.1.1/activerecord/test/cases/encryption/helper.rb#L115-L1201 parent 1337a57 commit db406bb
1 file changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
44 | | - | |
45 | | - | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
0 commit comments