Skip to content

Commit 4386f29

Browse files
[Backport 8.17] Address integration test failures in Python 3.8 (#3020)
* Address integration test failures in Python 3.8 (#3018) (cherry picked from commit 67c444c) * add one more test to the failing list --------- Co-authored-by: Miguel Grinberg <[email protected]>
1 parent 302efb5 commit 4386f29

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

test_elasticsearch/test_server/test_rest_api_spec.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
"cluster/voting_config_exclusions",
7979
"entsearch/10_basic",
8080
"indices/clone",
81+
"indices/data_stream_mappings[0]",
82+
"indices/data_streams_options[0]",
8183
"indices/resolve_cluster",
8284
"indices/settings",
8385
"indices/split",
@@ -501,7 +503,13 @@ def remove_implicit_resolver(cls, tag_to_remove):
501503
)
502504

503505
# 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))
506+
package_zip = zipfile.ZipFile(
507+
io.BytesIO(
508+
http.request(
509+
"GET", yaml_tests_url, retries=urllib3.Retry(3, redirect=10)
510+
).data
511+
)
512+
)
505513

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