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 shipping_method_spec test flakiness #4169

Merged
merged 1 commit into from
Sep 15, 2021

Conversation

DianeLooney
Copy link
Contributor

@DianeLooney DianeLooney commented Sep 14, 2021

Checking collection equality with eq can flake depending on the order of
items in the collection. Instead, using match_array allows for out of
order items.

Manually testing a second matcher with the collection .reversed gives a 100% fail rate. Changing the assertion to a match_array gives a 100% pass rate.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

Checking collection equality with eq can flake depending on the order of
items in the collection. Instead, using match_array allows for out of
order items.
Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

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

Thanks!

@jarednorman jarednorman merged commit c255f2e into solidusio:master Sep 15, 2021
@DianeLooney DianeLooney deleted the spec-flake-fix branch April 25, 2022 03:55
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.

3 participants