Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky localization tests #1664

Merged
merged 1 commit into from
Sep 12, 2024
Merged

Conversation

kaspth
Copy link
Contributor

@kaspth kaspth commented Aug 22, 2024

Fixes #1663

We shouldn't replace the whole Rails' app's RouteSet, particularly when the @routes instance variable already provides the hook.

Instead we can mirror what Rails does internally:
https://github.com/rails/rails/blob/a59ddc714fa0403cbd8c7ae6abdec2f71ee7b63f/actionpack/test/controller/test_case_test.rb#L1224C1-L1236C8

Fixes #1663

We shouldn't replace the whole Rails' app's RouteSet, particularly when the `@routes`
instance variable already provides the hook.

Instead we can mirror what Rails does internally:
https://github.com/rails/rails/blob/a59ddc714fa0403cbd8c7ae6abdec2f71ee7b63f/actionpack/test/controller/test_case_test.rb#L1224C1-L1236C8
@kaspth kaspth requested a review from jagthedrummer August 22, 2024 21:30
@kaspth kaspth self-assigned this Aug 22, 2024
Copy link
Contributor

@jagthedrummer jagthedrummer left a comment

Choose a reason for hiding this comment

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

Thanks, @kaspth!

@jagthedrummer jagthedrummer merged commit 1b19936 into main Sep 12, 2024
20 checks passed
@jagthedrummer jagthedrummer deleted the fix-flaky-localization-test branch September 12, 2024 22:14
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.

Localization test is flaky (maybe mainly in CI)
2 participants