Skip to content

Commit c505a47

Browse files
Fix retries on YAML test download
1 parent a511987 commit c505a47

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test_elasticsearch/test_server/test_rest_api_spec.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,13 @@ def remove_implicit_resolver(cls, tag_to_remove):
501501
)
502502

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

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

0 commit comments

Comments
 (0)