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_documents instead of test_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 by CountDocumentsAsyncTest + WriteDocumentsAsyncTest
test_async_write_and_delete_documents → covered by DeleteDocumentsAsyncTest
test_async_delete_all_documents → covered by DeleteAllAsyncTest
test_async_delete_all_documents_empty_store → covered by DeleteAllAsyncTest
test_delete_by_filter_async
test_update_by_filter_async
test_count_documents_by_filter_async
test_count_unique_metadata_by_filter_async
test_get_metadata_fields_info_async
test_get_metadata_field_min_max_async
test_get_metadata_field_unique_values_async
Tests to keep (Valkey-specific)
test_async_write_exceed_batch_size
test_async_write_exact_batch_size
test_async_write_multiple_full_batches
test_async_overwrite_documents
test_async_write_large_batch_performance
test_async_search_by_embedding_no_limit
test_async_search_by_embedding_with_limit
test_async_search_by_embedding_with_category_filter
test_async_search_by_embedding_with_numeric_filter
test_async_search_by_embedding_with_or_filter
test_async_search_by_embedding_with_in_filter
test_async_similarity_scores_are_set_correctly
test_async_filter_by_meta_score
test_async_search_with_meta_score_filter
test_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
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: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_asyncTests 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
document_storeasync fixture is correctly wired up