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 test: slice comparison to ignore element order #661

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

lvrach
Copy link
Member

@lvrach lvrach commented Sep 26, 2024

Description

Fixes flaky test that got introduced here #648

Linear Ticket

https://linear.app/rudderstack/issue/PRI-48/database-sql-stats

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@lvrach lvrach marked this pull request as ready for review September 26, 2024 19:35
Comment on lines +425 to +428

sort.Strings(received)
sort.Strings(expected)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you tried this?

Suggested change
sort.Strings(received)
sort.Strings(expected)
require.ElementsMatch(t, received, expected)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry didn't realize we're inside a require.Eventually so we can't use another require 👍

@fracasula fracasula enabled auto-merge (squash) September 27, 2024 08:31
@fracasula fracasula merged commit 545da59 into main Sep 27, 2024
14 checks passed
@fracasula fracasula deleted the fix.stats-test branch September 27, 2024 08:39
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.

4 participants