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 Qdrant integration should inherit the relevant mixins to avoid maintaining duplicate test code.
What needs to be done
In integrations/qdrant/tests/test_document_store_async.py, update the async test class to inherit the appropriate mixin classes:
from haystack.testing.document_store import (
WriteDocumentsAsyncTest,
DeleteAllAsyncTest,
DeleteByFilterAsyncTest,
UpdateByFilterAsyncTest,
CountDocumentsByFilterAsyncTest,
CountUniqueMetadataByFilterAsyncTest,
GetMetadataFieldsInfoAsyncTest,
GetMetadataFieldMinMaxAsyncTest,
GetMetadataFieldUniqueValuesAsyncTest,
)
Note: Check whether Qdrant implements count_documents_async and filter_documents_async — if so, also add CountDocumentsAsyncTest and FilterDocumentsAsyncTest.
Tests that can be removed (covered by mixins)
test_write_documents_async
test_delete_all_documents_async_no_index_recreation
test_delete_all_documents_async_index_recreation
test_delete_by_filter_async
test_delete_by_filter_async_no_matches
test_delete_by_filter_async_advanced_filters
test_update_by_filter_async
test_update_by_filter_async_multiple_fields
test_update_by_filter_async_no_matches
test_update_by_filter_async_advanced_filters
test_count_documents_by_filter_async
test_count_unique_metadata_by_filter_async
test_count_unique_metadata_by_filter_async_multiple_fields
test_count_unique_metadata_by_filter_async_with_filter
test_get_metadata_fields_info_async
test_get_metadata_field_min_max_async
test_get_metadata_field_unique_values_async
test_get_metadata_field_unique_values_async_pagination
test_get_metadata_field_unique_values_async_with_filter
Tests to keep (Qdrant-specific)
test_sparse_configuration_async
test_query_hybrid_async
test_query_hybrid_with_group_by_async
test_query_hybrid_fail_without_sparse_embedding_async
test_query_hybrid_search_batch_failure_async
test_set_up_collection_with_dimension_mismatch_async
test_set_up_collection_with_existing_incompatible_collection_async
test_set_up_collection_use_sparse_embeddings_true_without_named_vectors_async
test_set_up_collection_use_sparse_embeddings_false_with_named_vectors_async
test_set_up_collection_with_distance_mismatch_async
test_update_by_filter_async_preserves_vectors (Qdrant-specific vector preservation)
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 Qdrant integration should inherit the relevant mixins to avoid maintaining duplicate test code.What needs to be done
In
integrations/qdrant/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_write_documents_asynctest_delete_all_documents_async_no_index_recreationtest_delete_all_documents_async_index_recreationtest_delete_by_filter_asynctest_delete_by_filter_async_no_matchestest_delete_by_filter_async_advanced_filterstest_update_by_filter_asynctest_update_by_filter_async_multiple_fieldstest_update_by_filter_async_no_matchestest_update_by_filter_async_advanced_filterstest_count_documents_by_filter_asynctest_count_unique_metadata_by_filter_asynctest_count_unique_metadata_by_filter_async_multiple_fieldstest_count_unique_metadata_by_filter_async_with_filtertest_get_metadata_fields_info_asynctest_get_metadata_field_min_max_asynctest_get_metadata_field_unique_values_asynctest_get_metadata_field_unique_values_async_paginationtest_get_metadata_field_unique_values_async_with_filterTests to keep (Qdrant-specific)
test_sparse_configuration_asynctest_query_hybrid_asynctest_query_hybrid_with_group_by_asynctest_query_hybrid_fail_without_sparse_embedding_asynctest_query_hybrid_search_batch_failure_asynctest_set_up_collection_with_dimension_mismatch_asynctest_set_up_collection_with_existing_incompatible_collection_asynctest_set_up_collection_use_sparse_embeddings_true_without_named_vectors_asynctest_set_up_collection_use_sparse_embeddings_false_with_named_vectors_asynctest_set_up_collection_with_distance_mismatch_asynctest_update_by_filter_async_preserves_vectors(Qdrant-specific vector preservation)Acceptance criteria
document_storeasync fixture is correctly wired up