Skip to content

Commit aed893c

Browse files
Address integration test failures in Python 3.8 (#3018) (#3019)
(cherry picked from commit 67c444c) Co-authored-by: Miguel Grinberg <[email protected]>
1 parent 3808515 commit aed893c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

test_elasticsearch/test_server/test_rest_api_spec.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"cluster/voting_config_exclusions",
7979
"entsearch/10_basic",
8080
"indices/clone",
81+
"indices/data_stream_mappings[0]",
8182
"indices/resolve_cluster",
8283
"indices/settings",
8384
"indices/split",
@@ -501,7 +502,13 @@ def remove_implicit_resolver(cls, tag_to_remove):
501502
)
502503

503504
# 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))
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+
)
505512

506513
for yaml_file in package_zip.namelist():
507514
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)