Skip to content

Conversation

@machisuke
Copy link
Contributor

@machisuke machisuke commented Jul 26, 2022

background

ActiveRecord v5 and v6 uses ActiveSupport::Dependencies#constantize, ActiveSupport::Dependencies#saef_constantize which uses cached constantize results.

According to this, the above behavior is bug and fixed in ActiveRecord v7

changes

If the tests run with ActiveRecord v5 and v6, clear the cache in the before hook of all test cases to avoid ActiveRecord edge case bug.

note

Pulled out of #255

@machisuke machisuke force-pushed the isolate_tests branch 2 times, most recently from 2503aa2 to 90a49c3 Compare July 26, 2022 01:45
Copy link
Collaborator

@kbrock kbrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@kbrock
Copy link
Collaborator

kbrock commented Aug 10, 2022

@machisuke where are you seeing side effects of this bug?
Are there particular tests that are having problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants