Skip to content

Commit b236c34

Browse files
Address integration test failures in Python 3.8
1 parent cd96ea7 commit b236c34

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
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):

test_elasticsearch/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def wipe_data_streams(client):
179179
def wipe_indices(client):
180180
indices = client.cat.indices().strip().splitlines()
181181
if len(indices) > 0:
182-
index_names = [i.split(" ")[2] for i in indices]
182+
index_names = [i.split()[2] for i in indices]
183183
client.options(ignore_status=404).indices.delete(
184184
index=",".join(index_names),
185185
expand_wildcards="all",

0 commit comments

Comments
 (0)