Skip to content

Commit a67c2ee

Browse files
Minor improvement to fix in #3018 (#3031)
1 parent e3e85ed commit a67c2ee

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

test_elasticsearch/test_server/test_rest_api_spec.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -495,20 +495,14 @@ def remove_implicit_resolver(cls, tag_to_remove):
495495
# Try loading the REST API test specs from the Elastic Artifacts API
496496
try:
497497
# Construct the HTTP and Elasticsearch client
498-
http = urllib3.PoolManager(retries=10)
498+
http = urllib3.PoolManager(retries=urllib3.Retry(total=10))
499499

500500
yaml_tests_url = (
501501
"https://api.github.com/repos/elastic/elasticsearch-clients-tests/zipball/main"
502502
)
503503

504504
# Download the zip and start reading YAML from the files in memory
505-
package_zip = zipfile.ZipFile(
506-
io.BytesIO(
507-
http.request(
508-
"GET", yaml_tests_url, retries=urllib3.Retry(3, redirect=10)
509-
).data
510-
)
511-
)
505+
package_zip = zipfile.ZipFile(io.BytesIO(http.request("GET", yaml_tests_url).data))
512506

513507
for yaml_file in package_zip.namelist():
514508
if not re.match(r"^.*\/tests\/.*\.ya?ml$", yaml_file):

0 commit comments

Comments
 (0)