-
Notifications
You must be signed in to change notification settings - Fork 221
Labels
Description
As part of deepset-ai/haystack#10799, async test mixin classes are being added to haystack.testing.document_store. Once those are in place, the Valkey integration should inherit the relevant mixins to avoid maintaining duplicate test code.
What needs to be done
In integrations/valkey/tests/test_document_store_async.py, update the async test class to inherit the appropriate mixin classes:
from haystack.testing.document_store import (
CountDocumentsAsyncTest,
WriteDocumentsAsyncTest,
DeleteDocumentsAsyncTest,
DeleteAllAsyncTest,
DeleteByFilterAsyncTest,
UpdateByFilterAsyncTest,
CountDocumentsByFilterAsyncTest,
CountUniqueMetadataByFilterAsyncTest,
GetMetadataFieldsInfoAsyncTest,
GetMetadataFieldMinMaxAsyncTest,
GetMetadataFieldUniqueValuesAsyncTest,
)Note: The existing Valkey async tests use non-standard naming (e.g.
test_async_write_and_count_documentsinstead oftest_write_documents_async). When inheriting the mixins, ensure the mixin tests don't overlap in intent with the remaining store-specific tests.
Tests that can be removed (covered by mixins)
test_async_write_and_count_documents→ covered byCountDocumentsAsyncTest+WriteDocumentsAsyncTesttest_async_write_and_delete_documents→ covered byDeleteDocumentsAsyncTesttest_async_delete_all_documents→ covered byDeleteAllAsyncTesttest_async_delete_all_documents_empty_store→ covered byDeleteAllAsyncTesttest_delete_by_filter_asynctest_update_by_filter_asynctest_count_documents_by_filter_asynctest_count_unique_metadata_by_filter_asynctest_get_metadata_fields_info_asynctest_get_metadata_field_min_max_asynctest_get_metadata_field_unique_values_async
Tests to keep (Valkey-specific)
test_async_write_exceed_batch_sizetest_async_write_exact_batch_sizetest_async_write_multiple_full_batchestest_async_overwrite_documentstest_async_write_large_batch_performancetest_async_search_by_embedding_no_limittest_async_search_by_embedding_with_limittest_async_search_by_embedding_with_category_filtertest_async_search_by_embedding_with_numeric_filtertest_async_search_by_embedding_with_or_filtertest_async_search_by_embedding_with_in_filtertest_async_similarity_scores_are_set_correctlytest_async_filter_by_meta_scoretest_async_search_with_meta_score_filtertest_get_metadata_field_min_max_empty_store_async(Valkey-specific empty-store edge case)test_get_metadata_field_unique_values_with_search_term_async(Valkey-specific search term behaviour)
Acceptance criteria
- The async test class inherits the relevant async mixin classes
- The
document_storeasync fixture is correctly wired up - All duplicate tests listed above are removed
- All Valkey-specific tests are preserved
- The full test suite passes
Reactions are currently unavailable