From ee45c79158e53301680795e795ce9272b49e7cca Mon Sep 17 00:00:00 2001 From: zhuwenxing Date: Wed, 31 May 2023 15:37:29 +0800 Subject: [PATCH] [skip e2e]fix deploy case (#24553) Signed-off-by: zhuwenxing --- .../deploy/scripts/action_after_upgrade.py | 10 +++++----- tests/python_client/deploy/scripts/utils.py | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/python_client/deploy/scripts/action_after_upgrade.py b/tests/python_client/deploy/scripts/action_after_upgrade.py index 6b3c25a7d2..b1da6ce87d 100644 --- a/tests/python_client/deploy/scripts/action_after_upgrade.py +++ b/tests/python_client/deploy/scripts/action_after_upgrade.py @@ -15,7 +15,7 @@ def task_1(data_size, host): prefix = "task_1_" connections.connect(host=host, port=19530, timeout=60) col_list = get_collections(prefix, check=True) - assert len(col_list) == len(all_index_types) + assert len(col_list) > 0 create_index(prefix) load_and_search(prefix) create_collections_and_insert_data(prefix, count=data_size) @@ -33,7 +33,7 @@ def task_2(data_size, host): prefix = "task_2_" connections.connect(host=host, port=19530, timeout=60) col_list = get_collections(prefix, check=True) - assert len(col_list) == len(all_index_types) + assert len(col_list) > 0 load_and_search(prefix) create_collections_and_insert_data(prefix, count=data_size) release_collection(prefix) @@ -50,7 +50,7 @@ def task_3(data_size, host): prefix = "task_3_" connections.connect(host=host, port=19530, timeout=60) col_list = get_collections(prefix, check=True) - assert len(col_list) == len(all_index_types) + assert len(col_list) > 0 load_and_search(prefix) create_collections_and_insert_data(prefix, count=data_size) release_collection(prefix) @@ -67,7 +67,7 @@ def task_4(data_size, host): prefix = "task_4_" connections.connect(host=host, port=19530, timeout=60) col_list = get_collections(prefix, check=True) - assert len(col_list) == len(all_index_types) + assert len(col_list) > 0 load_and_search(prefix, replicas=NUM_REPLICAS) create_collections_and_insert_data(prefix, flush=False, count=data_size) load_and_search(prefix, replicas=NUM_REPLICAS) @@ -82,7 +82,7 @@ def task_5(data_size, host): prefix = "task_5_" connections.connect(host=host, port=19530, timeout=60) col_list = get_collections(prefix, check=True) - assert len(col_list) == len(all_index_types) + assert len(col_list) > 0 create_index(prefix) load_and_search(prefix, replicas=NUM_REPLICAS) create_collections_and_insert_data(prefix, flush=True, count=data_size) diff --git a/tests/python_client/deploy/scripts/utils.py b/tests/python_client/deploy/scripts/utils.py index cf7f4d5638..e8990f0aea 100644 --- a/tests/python_client/deploy/scripts/utils.py +++ b/tests/python_client/deploy/scripts/utils.py @@ -31,7 +31,11 @@ def filter_collections_by_prefix(prefix): res = [] for col in col_list: if col.startswith(prefix): - res.append(col) + if any(index_name in col for index_name in all_index_types): + res.append(col) + else: + logger.warning(f"collection {col} has no supported index, skip") + logger.info(f"filtered collections with prefix {prefix}: {res}") return res