Skip to content

Commit 2e74a7f

Browse files
committed
Fix CI with 409 retries and longer request timeout
1 parent f5dd27a commit 2e74a7f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ packages = ["elasticsearch_serverless"]
101101
junit_family = "legacy"
102102
xfail_strict = true
103103
markers = "otel"
104+
asyncio_default_fixture_loop_scope = "function"
104105

105106
[tool.isort]
106107
profile = "black"

test_elasticsearch_serverless/test_server/test_rest_api_spec.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,6 @@
9494
"cluster/component_templates",
9595
# TODO: expecting `ct_field` field mapping to be returned, but instead only finds `field`
9696
"indices/simulate_template",
97-
# Fixed by https://github.com/elastic/elasticsearch-clients-tests/pull/56
98-
"cat/aliases",
99-
"cat/component_templates",
100-
"cat/count",
101-
"cat/help",
102-
"cat/indices",
103-
"cat/ml",
104-
"cat/transform",
10597
# TODO: Not investigated yet
10698
"indices/settings",
10799
"logstash/10_basic",
@@ -488,7 +480,14 @@ def _skip_intentional_type_errors(self, e: Exception):
488480

489481
@pytest.fixture(scope="function")
490482
def sync_runner(sync_client_factory):
491-
return YamlRunner(sync_client_factory)
483+
client = sync_client_factory.options(
484+
retry_on_status=[409],
485+
max_retries=10,
486+
retry_on_timeout=True,
487+
request_timeout=120,
488+
)
489+
490+
return YamlRunner(client)
492491

493492

494493
# Source: https://stackoverflow.com/a/37958106/5763213

0 commit comments

Comments
 (0)