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 pgvector integration should inherit the relevant mixins to avoid maintaining duplicate test code.
What needs to be done
In integrations/pgvector/tests/test_document_store_async.py, update the async test class to inherit the appropriate mixin classes:
from haystack.testing.document_store import (
DocumentStoreBaseExtendedAsyncTests,
CountDocumentsByFilterAsyncTest,
CountUniqueMetadataByFilterAsyncTest,
GetMetadataFieldsInfoAsyncTest,
GetMetadataFieldMinMaxAsyncTest,
GetMetadataFieldUniqueValuesAsyncTest,
)
Tests that can be removed (covered by mixins)
test_write_documents
test_count_documents
test_filter_documents
test_delete_documents
test_delete_all_documents_async
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_get_metadata_fields_info_async
test_get_metadata_field_min_max_async
test_get_metadata_field_unique_values_async
Tests to keep (pgvector-specific)
test_write_blob
test_connection_check_and_recreation
test_invalid_connection_string
test_hnsw_index_recreation
test_create_table_if_not_exists
test_delete_table_async_first_call
test_update_by_filter_async_empty_meta_raises_error (pgvector-specific validation)
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 pgvector integration should inherit the relevant mixins to avoid maintaining duplicate test code.What needs to be done
In
integrations/pgvector/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_documentstest_count_documentstest_filter_documentstest_delete_documentstest_delete_all_documents_asynctest_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_get_metadata_fields_info_asynctest_get_metadata_field_min_max_asynctest_get_metadata_field_unique_values_asyncTests to keep (pgvector-specific)
test_write_blobtest_connection_check_and_recreationtest_invalid_connection_stringtest_hnsw_index_recreationtest_create_table_if_not_existstest_delete_table_async_first_calltest_update_by_filter_async_empty_meta_raises_error(pgvector-specific validation)Acceptance criteria
document_storeasync fixture is correctly wired up