feat(mongodb-atlas): use async DocumentStore mixin tests#3249
Merged
davidsbatista merged 4 commits intodeepset-ai:mainfrom Apr 28, 2026
Merged
Conversation
Contributor
|
Heads-up for maintainers This PR is from a fork and touches integrations whose integration tests require API keys. Affected integrations:
Please run the integration tests locally ( |
Contributor
Contributor
Author
|
Hey @davidsbatista this PR is ready for review. Unit tests are passing in CI; integration tests require |
davidsbatista
approved these changes
Apr 28, 2026
Contributor
davidsbatista
left a comment
There was a problem hiding this comment.
Looks good! Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes
Updates
integrations/mongodb_atlas/tests/test_document_store_async.pyto inherit the async mixin test classes fromhaystack.testing.document_store_async, removing duplicate test code that is now covered by the shared mixins.Mixin classes added:
CountDocumentsAsyncTestWriteDocumentsAsyncTestDeleteDocumentsAsyncTestDeleteAllAsyncTestDeleteByFilterAsyncTestFilterDocumentsAsyncTestUpdateByFilterAsyncTestCountDocumentsByFilterAsyncTestCountUniqueMetadataByFilterAsyncTestGetMetadataFieldsInfoAsyncTestGetMetadataFieldMinMaxAsyncTestGetMetadataFieldUniqueValuesAsyncTestTests removed (now covered by mixins):
test_write_documents_asynctest_count_documents_asynctest_filter_documents_asynctest_delete_documents_asynctest_delete_by_filter_asynctest_update_by_filter_asynctest_delete_all_documents_asynctest_delete_all_documents_async_empty_collectiontest_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 kept (MongoDB Atlas-specific):
test_write_blob_async— binary/ByteStream document handlingtest_delete_all_documents_async_with_recreate_collection— MongoDB-specificrecreate_collection=TrueparameterOverrides added:
test_count_not_empty_asyncbase class uses@staticmethodwhich breaks fixture injectiontest_write_documents_asyncMongoDB raisesDuplicateDocumentErroron duplicate withFAILpolicyHow did you test it?
Unit tests (
TestEnsureConnectionSetupAsync,TestMongoDBDocumentStoreAsyncUnit) run without requiring a live MongoDB connection. Integration tests requireMONGO_CONNECTION_STRING.Notes for the reviewer
Followed the same pattern as the Elasticsearch async test refactor. The
@pytest_asyncio.fixturedecorator is used for thedocument_storefixture, consistent with other integrations.Checklist
feat: