Skip to content

test: replacing each DocumentStore specific tests and used the generalised ones from haystack.testing.document_store#2812

Merged
davidsbatista merged 60 commits intomainfrom
chore/removing-duplicated-standardised-tests
Feb 12, 2026
Merged

test: replacing each DocumentStore specific tests and used the generalised ones from haystack.testing.document_store#2812
davidsbatista merged 60 commits intomainfrom
chore/removing-duplicated-standardised-tests

Conversation

@davidsbatista
Copy link
Contributor

@davidsbatista davidsbatista commented Feb 4, 2026

Related Issues

Proposed Changes:

  • Use Haystack’s shared document store test mixins (DeleteDocumentsTest, UpdateByFilterTest, etc.) instead of custom duplicated tests across integrations.
Document store # duplicated tests removed
Astra 3
Azure AI Search 6
Chroma 4
Elasticsearch 3
MongoDB Atlas 4
OpenSearch 3
pgvector 8
Pinecone 7
Qdrant 8
Weaviate 3

Total tests removed: 49, and 7 overrides tests added in Azure AI Search

  • Bug fixes
    • Chroma: Guard delete_all_documents() so it doesn’t call delete(ids=[]) on an empty collection (avoids Chroma error when there are no docs).
    • Azure AI Search: Handle booleans in filter helpers _eq / _ne in filters.py (e.g. true/false in OData).
    • Azure AI Search: Conftest update_by_filter_and_wait updated to accept meta (and fields/kwargs) and pass the correct updates into update_by_filter.

How did you test it?

  • Run each integration’s document store tests (e.g. pytest integrations/<name>/tests/test_document_store.py).
  • Confirm no custom delete/update-by-filter tests remain except where overrides are required (e.g. parametrized metadata or backend-specific options).

Notes for the reviewer

Checklist

Copy link
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some minor comments.

Also, I think we can maybe safely avoid increasing haystack-ai pin:

  • we would not force users to update to a newer Haystack version when their document store can already work with previous versions (we just changed tests)
  • in the CI, the latest stable version will run in any case
  • if we avoid changing pins, we can keep everything in this PR and don't worry about releasing new versions.

WDYT?

davidsbatista and others added 4 commits February 12, 2026 15:15
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
@davidsbatista
Copy link
Contributor Author

I'm probably missing something. If we don't increase the dependency on the latest haystack to at least 2.24, the tests will fail, since the new tests code is in this new release.

@anakin87
Copy link
Member

I'm probably missing something. If we don't increase the dependency on the latest haystack to at least 2.24, the tests will fail, since the new tests code is in this new release.

By default, when pinning haystack-ai>=X.Y.Z, the latest stable version is installed (2.24.1) (unless other dependencies have conflicting dependencies), which is OK for the CI. You can try...

@anakin87
Copy link
Member

I'm probably missing something. If we don't increase the dependency on the latest haystack to at least 2.24, the tests will fail, since the new tests code is in this new release.

By default, when pinning haystack-ai>=X.Y.Z, the latest stable version is installed (2.24.1) (unless other dependencies have conflicting dependencies), which is OK for the CI. You can try...

I was wrong because we also run unit tests with the lowest possible dependencies and this would make imports fail.

Copy link
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Thank you for the standardization work!

@davidsbatista davidsbatista merged commit 47f72c0 into main Feb 12, 2026
43 checks passed
@davidsbatista davidsbatista deleted the chore/removing-duplicated-standardised-tests branch February 12, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid duplicating test code in DocumentStore integrations

2 participants