From b16c4d097f67223d74a4c5527097aa2463b3b8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Palomeque?= Date: Thu, 24 Aug 2023 09:54:47 -0300 Subject: [PATCH] fix(#4299): Adapt reliability tests to Python 3.7 --- .../test_cluster_logs/test_cluster_master_logs_order/README.md | 3 ++- .../test_cluster_master_logs_order.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/README.md b/tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/README.md index 57f8619eec..ca638d3673 100644 --- a/tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/README.md +++ b/tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/README.md @@ -63,7 +63,8 @@ artifacts_path = '/docs/agent_groups' with open(cluster_log_files) as file: for line in file.readlines(): - if result := logs_format.search(line): + result = logs_format.search(line) + if result: if 'Worker' in result.group(1): name = re.search('.*Worker (.*?)]', result.group(1)).group(1) if name not in all_managers: diff --git a/tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py b/tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py index c3d3f4192f..9acaacb2c7 100644 --- a/tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py +++ b/tests/reliability/test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py @@ -68,7 +68,8 @@ def test_check_logs_order_master(artifacts_path): with open(cluster_log_files) as file: for line in file.readlines(): - if result := logs_format.search(line): + result = logs_format.search(line) + if result: node_name = result.group(1) if 'Worker' in node_name: name = re.search('.*Worker (.*?)]', node_name).group(1)