From 991f403996dec97f1b68ac730f26e9cfe8a92b11 Mon Sep 17 00:00:00 2001 From: Joan Martinez Date: Mon, 12 Feb 2024 10:32:05 +0100 Subject: [PATCH] ci: check v8 tests failing Signed-off-by: Joan Martinez --- .github/workflows/ci.yml | 6 +++--- tests/index/elastic/v8/test_find.py | 5 +++++ tests/index/elastic/v8/test_index_get_del.py | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8c4added62..090ed8412a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -217,7 +217,7 @@ jobs: - name: Test id: test run: | - poetry run pytest -m 'index and not elasticv8' --cov=docarray --cov-report=xml tests/index/${{ matrix.db_test_folder }} + poetry run pytest -m 'index and not elasticv8' -s -v --cov=docarray --cov-report=xml tests/index/${{ matrix.db_test_folder }} echo "flag it as docarray for codeoverage" echo "codecov_flag=docarray" >> $GITHUB_OUTPUT timeout-minutes: 30 @@ -242,7 +242,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8] + python-version: [3.10] pydantic-version: ["pydantic-v2", "pydantic-v1"] steps: - uses: actions/checkout@v2.5.0 @@ -267,7 +267,7 @@ jobs: - name: Test id: test run: | - poetry run pytest -m 'index and elasticv8' --cov=docarray --cov-report=xml tests + poetry run pytest -m 'index and elasticv8' -s -v --cov=docarray --cov-report=xml tests echo "flag it as docarray for codeoverage" echo "codecov_flag=docarray" >> $GITHUB_OUTPUT timeout-minutes: 30 diff --git a/tests/index/elastic/v8/test_find.py b/tests/index/elastic/v8/test_find.py index 27a6295a654..9a88c290960 100644 --- a/tests/index/elastic/v8/test_find.py +++ b/tests/index/elastic/v8/test_find.py @@ -18,6 +18,11 @@ @pytest.mark.parametrize('similarity', ['cosine', 'l2_norm', 'dot_product']) def test_find_simple_schema(similarity, tmp_index_name): # noqa: F811 + from elasticsearch import Elasticsearch + + es = Elasticsearch(hosts='http://localhost:9200/') + ping = es.ping() + print(f'PING WORKED? {ping}') class SimpleSchema(BaseDoc): tens: NdArray[10] = Field(similarity=similarity) diff --git a/tests/index/elastic/v8/test_index_get_del.py b/tests/index/elastic/v8/test_index_get_del.py index 13010559d21..ce9819efafb 100644 --- a/tests/index/elastic/v8/test_index_get_del.py +++ b/tests/index/elastic/v8/test_index_get_del.py @@ -28,6 +28,11 @@ def test_index_simple_schema( ten_simple_docs, use_docarray, tmp_index_name # noqa: F811 ): + from elasticsearch import Elasticsearch + + es = Elasticsearch(hosts='http://localhost:9200/') + ping = es.ping() + print(f'PING WORKED? {ping}') index = ElasticDocIndex[SimpleDoc](index_name=tmp_index_name) if use_docarray: ten_simple_docs = DocList[SimpleDoc](ten_simple_docs)