-
Notifications
You must be signed in to change notification settings - Fork 2.7k
DeleteAllAsyncTest, DeleteByFilterAsyncTest, #10919
Copy link
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
DeleteAllAsyncTest
Mirrors: DeleteAllTest
| Test | Description |
|---|---|
test_delete_all_documents_async |
Write 2 docs, delete all, count is 0; write 1 new doc, count is 1 |
test_delete_all_documents_empty_store_async |
delete_all_documents_async() on empty store doesn't raise, count stays 0 |
test_delete_all_documents_without_recreate_index_async |
Skipped if recreate_index/recreate_collection param not present; else tests False variant |
test_delete_all_documents_with_recreate_index_async |
Skipped if param not present; else tests True variant, verifies store still works after |
Use
inspect.signature(document_store.delete_all_documents_async)to detectrecreate_index/recreate_collectionparameter (same pattern as syncDeleteAllTest._delete_all_supports_recreate).
DeleteByFilterAsyncTest
Mirrors: DeleteByFilterTest
| Test | Description |
|---|---|
test_delete_by_filter_async |
Write 3 docs, delete 2 by category filter, verify 1 remains |
test_delete_by_filter_no_matches_async |
Filter matching nothing returns 0 deleted, store unchanged |
test_delete_by_filter_advanced_filters_async |
AND and OR compound filter deletions in sequence |
Use
inspect.signature(document_store.delete_by_filter_async)to detect optionalrefreshparameter.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High priority, add to the next sprintHigh priority, add to the next sprint