diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-12-05 13:30:43 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-12-05 13:30:43 +0900 |
commit | 65c4b1b50df3fa59198de2d45d1f54b61ecc7864 (patch) | |
tree | cc60d3e5d8578fc29a9823b3197f3b4c94ca16a4 | |
parent | 3a8659930405eda2a75f69abe1e332db772aba4f (diff) | |
download | rails-65c4b1b50df3fa59198de2d45d1f54b61ecc7864.tar.gz rails-65c4b1b50df3fa59198de2d45d1f54b61ecc7864.tar.bz2 rails-65c4b1b50df3fa59198de2d45d1f54b61ecc7864.zip |
Fix unstable `test_serialized_attribute_works_under_concurrent_initial_access` test
Since bd62389307e138ee0f274a9d62697567a3334ea0, isolate test of `test_serialized_attribute_works_under_concurrent_initial_access` fails.
```
$ ./bin/test -w test/cases/serialized_attribute_test.rb -n test_serialized_attribute_works_under_concurrent_initial_access
Using sqlite3
Run options: -n test_serialized_attribute_works_under_concurrent_initial_access --seed 32129
# Running:
E
Error:
SerializedAttributeTest#test_serialized_attribute_works_under_concurrent_initial_access:
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table:
```
If duplicate an unloaded model, it seems that method invocation for that class
is not guaranteed. Use the original class to avoid it.
-rw-r--r-- | activerecord/test/cases/serialized_attribute_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/serialized_attribute_test.rb b/activerecord/test/cases/serialized_attribute_test.rb index 08ab4dc600..f6cd4f85ee 100644 --- a/activerecord/test/cases/serialized_attribute_test.rb +++ b/activerecord/test/cases/serialized_attribute_test.rb @@ -371,7 +371,7 @@ class SerializedAttributeTest < ActiveRecord::TestCase end def test_serialized_attribute_works_under_concurrent_initial_access - model = Topic.dup + model = ::Topic.dup topic = model.last topic.update group: "1" |