Skip to content

Fix flaky partial snapshot test#7358

Merged
timvisee merged 1 commit intodevfrom
fix-flaky-partial-snapshot-test
Oct 7, 2025
Merged

Fix flaky partial snapshot test#7358
timvisee merged 1 commit intodevfrom
fix-flaky-partial-snapshot-test

Conversation

@timvisee
Copy link
Member

@timvisee timvisee commented Oct 7, 2025

Fixes:

================================================================= FAILURES =================================================================
_______________________________________________________ test_partial_snapshot_empty ________________________________________________________

    def test_partial_snapshot_empty(tmp_path: pathlib.Path):
        # ...

        # Ensure that both replicas are in sync (because of collection snapshot) and new partial snapshots are empty
        resp = create_partial_snapshot(write_peer, shard = 0, manifest = get_snapshot_manifest(read_peer))
>       assert resp.status_code == 304
E       assert 200 == 304
E        +  where 200 = <Response [200]>.status_code

tests/consensus_tests/test_partial_snapshot.py:143: AssertionError
========================================================= short test summary info ==========================================================
FAILED tests/consensus_tests/test_partial_snapshot.py::test_partial_snapshot_empty - assert 200 == 304
============================================================ 1 failed in 11.55s ============================================================

Adjust partial snapshot test bootstrapping to wait for a green collection status. This way we are sure there is no asynchronous optimization task messing with our tests.

Before this change, pytest tests/consensus_tests/test_partial_snapshot.py::test_partial_snapshot_empty reliably fails for me if I change the number of points to 10k here.

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

@qdrant qdrant deleted a comment from coderabbitai bot Oct 7, 2025
@timvisee timvisee mentioned this pull request Oct 7, 2025
@timvisee timvisee merged commit 3856ff6 into dev Oct 7, 2025
16 checks passed
@timvisee timvisee deleted the fix-flaky-partial-snapshot-test branch October 7, 2025 13:57
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