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

chore(backend): fix some more racy backend tests by not asserting on exact order #3247

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

corneliusroemer
Copy link
Contributor

@corneliusroemer corneliusroemer commented Nov 19, 2024

resolves #3242

This should avoid most of the flakes due to similar wrongly strong assumptions about SQL result order being stable without explicit sorting.

I can't find any more instances of jsonPath("\$[*].

But I should also look for jsonPath("\$[0] which I haven't done. Just noticed some tests like this in the revocation tests.

… independent helper

I keep getting some flakes due to exact order requirements in tests.

So I've now added a helper that makes it easy to test for accession versions being present in any order.

Using this consistently in one test file where I've gotten a few flakes recently, but could probably be rolled out elsewhere as well.
@corneliusroemer corneliusroemer marked this pull request as ready for review November 19, 2024 18:29
@corneliusroemer corneliusroemer added backend related to the loculus backend component review please PR waiting for final review labels Nov 19, 2024
Copy link
Contributor

@fengelniederhammer fengelniederhammer left a comment

Choose a reason for hiding this comment

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

LGTM

@corneliusroemer corneliusroemer merged commit 04e661b into main Nov 20, 2024
19 checks passed
@corneliusroemer corneliusroemer deleted the fix-test2 branch November 20, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend related to the loculus backend component review please PR waiting for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky backend test with wrong assumptions about ordering
2 participants