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 tests without guaranteed sort #48580

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

abaldwin88
Copy link
Contributor

@abaldwin88 abaldwin88 commented Jun 26, 2023

Motivation / Background

These test assertions rely on database queries that lack an ORDER BY statement. On occasion the database will return results from these queries in an unexpected order resulting in a flaky test.

Additional information

Further Reading... https://www.simplethread.com/chaos-order-randomizing-queries-uncover-order-dependency/

Here's the hacked together code (edits done via vim macros) I used to flush these out... main...abaldwin88:rails:chaos_order

These test assertions rely on database queries that lack an ORDER BY statement. On occasion the database will return results from these queries in an unexpected order.
@rafaelfranca rafaelfranca merged commit c5af1e3 into rails:main Jun 26, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants