Skip to content

refactor(valkey): use async DocumentStore mixin tests#3060

Open
SyedShahmeerAli12 wants to merge 11 commits intodeepset-ai:mainfrom
SyedShahmeerAli12:fix/valkey-async-mixin-tests
Open

refactor(valkey): use async DocumentStore mixin tests#3060
SyedShahmeerAli12 wants to merge 11 commits intodeepset-ai:mainfrom
SyedShahmeerAli12:fix/valkey-async-mixin-tests

Conversation

@SyedShahmeerAli12
Copy link
Copy Markdown
Contributor

Closes #3053

Refactors integrations/valkey/tests/test_document_store_async.py to inherit from the async
mixin classes introduced in deepset-ai/haystack#10975.

  • Removes 10 duplicate tests now covered by the mixins
  • Keeps Valkey-specific tests (batch operations, embedding search, scoring, metadata)
  • Overrides WriteDocumentsAsyncTest methods for unsupported duplicate policies (FAIL,
    SKIP) since ValkeyDocumentStore only supports NONE and OVERWRITE

SyedShahmeerAli12 and others added 9 commits March 25, 2026 15:21
Adds a new Haystack integration for Tavily, an AI-powered web search
API optimized for LLM applications. Implements sync and async search
via TavilyClient and AsyncTavilyClient, following the WebSearch
component interface used by existing integrations.

Closes deepset-ai#2961

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Inherit from async mixin classes introduced in deepset-ai/haystack#10975
to eliminate duplicate test code in TestValkeyDocumentStoreAsync.

Mixins added (from haystack.testing.document_store and document_store_async):
- CountDocumentsAsyncTest
- WriteDocumentsAsyncTest
- DeleteDocumentsAsyncTest
- DeleteAllAsyncTest
- DeleteByFilterAsyncTest
- UpdateByFilterAsyncTest
- CountDocumentsByFilterAsyncTest
- CountUniqueMetadataByFilterAsyncTest
- GetMetadataFieldMinMaxAsyncTest
- GetMetadataFieldUniqueValuesAsyncTest

Override WriteDocumentsAsyncTest methods that rely on DuplicatePolicy.FAIL
and DuplicatePolicy.SKIP, which are not supported by ValkeyDocumentStore.

Closes deepset-ai#3053

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@SyedShahmeerAli12 SyedShahmeerAli12 requested a review from a team as a code owner March 30, 2026 14:24
@SyedShahmeerAli12 SyedShahmeerAli12 requested review from julian-risch and removed request for a team March 30, 2026 14:24
SyedShahmeerAli12 and others added 2 commits March 30, 2026 20:14
- Override test_update_by_filter_async: uses filterable_docs fixture with
  undeclared 'chapter' field. Use declared fields (category, priority) instead.
- Override test_count_unique_metadata_by_filter_async_with_multiple_filters:
  uses undeclared 'year' field. Use declared fields (category, priority) instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Break long Document() lines to stay within 120-char limit
- Remove @staticmethod from test_count_unique_metadata_by_filter_async_with_multiple_filters
  so pytest can inject the document_store fixture correctly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use async DocumentStore mixin tests in Valkey

1 participant