Skip to content

Commit 65c4b1b

Browse files
committed
Fix unstable test_serialized_attribute_works_under_concurrent_initial_access test
Since bd62389, 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.
1 parent 3a86599 commit 65c4b1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/test/cases/serialized_attribute_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def deserialize(value)
371371
end
372372

373373
def test_serialized_attribute_works_under_concurrent_initial_access
374-
model = Topic.dup
374+
model = ::Topic.dup
375375

376376
topic = model.last
377377
topic.update group: "1"

0 commit comments

Comments
 (0)