diff --git a/poetry.lock b/poetry.lock index bd93ad0..c592bd6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1536,6 +1536,21 @@ pytest = ">=7.0.0,<9" docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] +[[package]] +name = "pytest-rerunfailures" +version = "15.0" +description = "pytest plugin to re-run tests to eliminate flaky failures" +optional = false +python-versions = ">=3.9" +files = [ + {file = "pytest-rerunfailures-15.0.tar.gz", hash = "sha256:2d9ac7baf59f4c13ac730b47f6fa80e755d1ba0581da45ce30b72fb3542b4474"}, + {file = "pytest_rerunfailures-15.0-py3-none-any.whl", hash = "sha256:dd150c4795c229ef44320adc9a0c0532c51b78bb7a6843a8c53556b9a611df1a"}, +] + +[package.dependencies] +packaging = ">=17.1" +pytest = ">=7.4,<8.2.2 || >8.2.2" + [[package]] name = "pytest-socket" version = "0.7.0" @@ -2115,4 +2130,4 @@ propcache = ">=0.2.0" [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "03dc65b04812848ac182436f07a67f3260ad82ce17f23b896992b1ed1848a7af" +content-hash = "3235b521d9b12ff8b154cdf4e342479e32f3dda06fa8b23b6a85f8cd59287c99" diff --git a/pyproject.toml b/pyproject.toml index a94fba6..96c0815 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,6 +64,7 @@ pytest-socket = "^0.7.0" pytest-watcher = "^0.3.4" langchain-community = "^0.3.11" langchain-tests = "==0.3.7" +pytest-rerunfailures = "^15.0" [tool.poetry.group.codespell.dependencies] codespell = "^2.2.6" diff --git a/tests/integration_tests/vectorstore/test_vector_cratedb_main.py b/tests/integration_tests/vectorstore/test_vector_cratedb_main.py index 91129ff..8ef5066 100644 --- a/tests/integration_tests/vectorstore/test_vector_cratedb_main.py +++ b/tests/integration_tests/vectorstore/test_vector_cratedb_main.py @@ -184,6 +184,7 @@ def test_cratedb_with_filter_match(engine: sa.Engine) -> None: assert scores == (1.0,) +@pytest.mark.flaky(reruns=5) def test_cratedb_with_filter_distant_match(engine: sa.Engine) -> None: """Test end to end construction and search.""" texts = ["foo", "bar", "baz"] @@ -310,6 +311,7 @@ def test_cratedb_collection_no_embedding_dimension( ) +@pytest.mark.flaky(reruns=5) @pytest.mark.parametrize("operator", ["$in", "IN"]) def test_cratedb_with_filter_in_set(engine: sa.Engine, operator: str) -> None: """Test end to end construction and search.""" diff --git a/tests/integration_tests/vectorstore/test_vector_cratedb_multi.py b/tests/integration_tests/vectorstore/test_vector_cratedb_multi.py index db8c591..bc8930c 100644 --- a/tests/integration_tests/vectorstore/test_vector_cratedb_multi.py +++ b/tests/integration_tests/vectorstore/test_vector_cratedb_multi.py @@ -12,6 +12,7 @@ from tests.integration_tests.vectorstore.util import prune_document_ids +@pytest.mark.flaky(reruns=5) def test_cratedb_multicollection_search_success(engine: sa.Engine) -> None: """ `CrateDBVectorStoreMultiCollection` provides functionality for