-
Notifications
You must be signed in to change notification settings - Fork 2.7k
UpdateByFilterAsyncTest, CountDocumentsByFilterAsyncTest, CountUniqueMetadataByFilterAsyncTest #10920
Copy link
Copy link
Closed
UpdateByFilterAsyncTest, CountDocumentsByFilterAsyncTest, CountUniqueMetadataByFilterAsyncTest#10920Task
Copy link
Labels
P1High priority, add to the next sprintHigh priority, add to the next sprint
Description
NOTES:
- Tests should be written into
haystack/testing/document_store_async.py - Use
async deffor all test methods - Decorate each test method with
@pytest.mark.asyncio - Rely on an
async-compatibledocument_storefixture (to be provided by the concrete test class in each integration) - Use
awaiton all*_async()calls - Use
write_documents_async/count_documents_asyncin setup steps (not the sync variants), so the full async path is exercised end-to-end - Open the PR to the async-mixin-tests feature branch
UpdateByFilterAsyncTest(FilterableDocsFixtureMixin)
Mirrors: UpdateByFilterTest
| Test | Description |
|---|---|
test_update_by_filter_async |
Update meta on matching docs, verify updated and non-updated docs |
test_update_by_filter_no_matches_async |
Filter matches nothing, returns 0, store count unchanged |
test_update_by_filter_multiple_fields_async |
Update multiple meta fields at once |
test_update_by_filter_advanced_filters_async |
AND/OR compound filter updates |
Use
inspect.signature(document_store.update_by_filter_async)to detect optionalrefreshparameter.
CountDocumentsByFilterAsyncTest
Mirrors: CountDocumentsByFilterTest
| Test | Description |
|---|---|
test_count_documents_by_filter_simple_async |
Simple equality filter |
test_count_documents_by_filter_compound_async |
AND filter |
test_count_documents_by_filter_no_matches_async |
Filter matches nothing, returns 0 |
test_count_documents_by_filter_empty_collection_async |
Empty store returns 0 |
CountUniqueMetadataByFilterAsyncTest
Mirrors: CountUniqueMetadataByFilterTest
| Test | Description |
|---|---|
test_count_unique_metadata_by_filter_all_documents_async |
No filter — distinct counts for all docs across multiple fields |
test_count_unique_metadata_by_filter_with_filter_async |
Simple filter narrows the distinct value counts |
test_count_unique_metadata_by_filter_with_multiple_filters_async |
AND compound filter |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High priority, add to the next sprintHigh priority, add to the next sprint