From bff71d55907463409c8e7a766f3b7380869e645f Mon Sep 17 00:00:00 2001 From: Tif Tran Date: Thu, 20 Nov 2025 18:48:51 -0800 Subject: [PATCH 1/3] chore suggest-sports: increase time es with_for_status --- .../providers/suggest/sports/backends/test_sportsdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/providers/suggest/sports/backends/test_sportsdata.py b/tests/integration/providers/suggest/sports/backends/test_sportsdata.py index ed118c8dc..32a3b9f5b 100644 --- a/tests/integration/providers/suggest/sports/backends/test_sportsdata.py +++ b/tests/integration/providers/suggest/sports/backends/test_sportsdata.py @@ -46,7 +46,7 @@ async def es_client(es_url): """Elasticsearch client fixture.""" client = AsyncElasticsearch(es_url, verify_certs=False, ssl_show_warn=False) try: - await client.cluster.health(wait_for_status="yellow", timeout="10s") + await client.cluster.health(wait_for_status="yellow", timeout="20s") yield client finally: await client.close() From aa3e8619d54d824561c807ddb40d5cc972eec4bd Mon Sep 17 00:00:00 2001 From: Tif Tran Date: Fri, 21 Nov 2025 07:46:48 -0800 Subject: [PATCH 2/3] test --- .../providers/suggest/sports/backends/test_sportsdata.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/providers/suggest/sports/backends/test_sportsdata.py b/tests/integration/providers/suggest/sports/backends/test_sportsdata.py index 32a3b9f5b..3126cbc4d 100644 --- a/tests/integration/providers/suggest/sports/backends/test_sportsdata.py +++ b/tests/integration/providers/suggest/sports/backends/test_sportsdata.py @@ -36,7 +36,11 @@ @pytest.fixture(scope="session") def es_url(): """ElasticSearch URL fixture.""" - with ElasticSearchContainer("docker.elastic.co/elasticsearch/elasticsearch:8.13.4") as es: + env = { + "discovery.type": "single-node", + "ES_JAVA_OPTS": "-Xms512m -Xmx512m", + } + with ElasticSearchContainer("docker.elastic.co/elasticsearch/elasticsearch:8.13.4").with_env("ES_JAVA_OPTS", "-Xms512m -Xmx512m") as es: url = es.get_url() yield url From 3066ee6ad37f71dd2df39376d77276178c2983a0 Mon Sep 17 00:00:00 2001 From: Tif Tran Date: Fri, 21 Nov 2025 08:06:36 -0800 Subject: [PATCH 3/3] all the settings --- .../suggest/sports/backends/test_sportsdata.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/integration/providers/suggest/sports/backends/test_sportsdata.py b/tests/integration/providers/suggest/sports/backends/test_sportsdata.py index 3126cbc4d..ad8b546b7 100644 --- a/tests/integration/providers/suggest/sports/backends/test_sportsdata.py +++ b/tests/integration/providers/suggest/sports/backends/test_sportsdata.py @@ -38,19 +38,26 @@ def es_url(): """ElasticSearch URL fixture.""" env = { "discovery.type": "single-node", + "xpack.security.enabled": "false", + "xpack.ml.enabled": "false", + "xpack.monitoring.collection.enabled": "false", + "ingest.geoip.downloader.enabled": "false", "ES_JAVA_OPTS": "-Xms512m -Xmx512m", } - with ElasticSearchContainer("docker.elastic.co/elasticsearch/elasticsearch:8.13.4").with_env("ES_JAVA_OPTS", "-Xms512m -Xmx512m") as es: + with ElasticSearchContainer("docker.elastic.co/elasticsearch/elasticsearch:8.13.4") as es: + for k, v in env.items(): + es.with_env(k,v) url = es.get_url() yield url + @pytest_asyncio.fixture async def es_client(es_url): """Elasticsearch client fixture.""" client = AsyncElasticsearch(es_url, verify_certs=False, ssl_show_warn=False) try: - await client.cluster.health(wait_for_status="yellow", timeout="20s") + await client.cluster.health(wait_for_status="yellow", timeout="10s") yield client finally: await client.close()