Skip to content

Real testcontainers tests for Qdrant (fixes event-loop block, ignored filter, id collision) — #829 - #837

Merged
AmitoVrito merged 3 commits into
mainfrom
feat/issue-829-testcontainers-qdrant
Jul 21, 2026
Merged

AmitoVrito merged 3 commits into
mainfrom
feat/issue-829-testcontainers-qdrant

Conversation

@AmitoVrito

Copy link
Copy Markdown
Collaborator

Summary

Next in epic #829: Qdrant. Deep testing against a real qdrant/qdrant found several mock-hidden bugs (#836), including one that violates the async-first invariant.

Bugs found & fixed

  • Blocked the event loop — add/search called the sync client directly inside async def; now offloaded via asyncio.to_thread.
  • metadata_filter silently ignored — now applies a native qdrant Filter.
  • ID collision on reconnect — per-instance integer ids overwrote existing points; now UUID ids (append-safe).
  • search before add raised — now returns [] for a missing collection.
  • Deprecated .search() → query_points.
  • Added metadata-length validation.

Verification (real data)

8/8 pass against qdrant/qdrant (real upserts + real vector query), including an explicit append-on-reconnect regression and an async-contract assertion. Wired into the CI integration job.

Commits

  • fix(retrieval): fix QdrantVectorStore against a real Qdrant (#836)
  • ci(test): add qdrant-client to the integration group and CI job (#829)

Part of #829.

Only ever MagicMock-tested, which hid several real bugs found against a real
qdrant/qdrant: it blocked the event loop (called the sync client directly inside
async def), silently ignored metadata_filter, reused per-instance integer ids so a
reconnect overwrote existing points, raised instead of returning [] before the
first add, and used the deprecated .search() API.

Offload all client calls via asyncio.to_thread (keeps the store async-first),
apply a native qdrant Filter for metadata_filter, use UUID point ids (append-safe
on reconnect), return [] for a missing collection, use query_points, and validate
metadata length. Adds real qdrant/qdrant testcontainers tests (nearest-neighbour
ranking, metadata filter, top_k, append-on-reconnect, negatives, async contract)
and removes the MagicMock test.

Part of #829. Closes #836.
@AmitoVrito
AmitoVrito merged commit 470761e into main Jul 21, 2026
6 checks passed
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.

1 participant