8000 fix: fix flaky test by andyzzhao · Pull Request #33539 · PostHog/posthog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: fix flaky test #33539

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

Merged
merged 1 commit into from
Jun 11, 2025
Merged

fix: fix flaky test #33539

merged 1 commit into from
Jun 11, 2025

Conversation

andyzzhao
Copy link
Contributor

Important

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Problem

Changes

Did you write or update any docs for this change?

How did you test this code?

Copy link
Contributor
@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Modified test case in ee/clickhouse/models/test/test_cohort.py to make it more resilient against non-deterministic database result ordering.

  • Updated test_cohortpeople_with_not_in_cohort_operator_and_no_precalculation to use assertCountEqual instead of relying on specific result ordering
  • Replaced direct array index assertions with set-based validation to handle variable result ordering from the database
  • Improves test reliability while maintaining the same functional coverage

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

@andyzzhao andyzzhao enabled auto-merge (squash) June 11, 2025 12:28
@andyzzhao andyzzhao merged commit ed086f3 into master Jun 11, 2025
97 checks passed
@andyzzhao andyzzhao deleted the andyzzhao-fix-flaky-test branch June 11, 2025 12:42
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
0