From a7b5dc6e04a890b0763063b2bff74e37071dd073 Mon Sep 17 00:00:00 2001 From: ThreadDao Date: Thu, 28 Jul 2022 16:00:31 +0800 Subject: [PATCH] [test] Update scale test image pull (#18437) Signed-off-by: ThreadDao --- build/ci/jenkins/Scale.groovy | 5 ++++- tests/python_client/scale/constants.py | 2 +- tests/python_client/utils/util_pymilvus.py | 12 ++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/build/ci/jenkins/Scale.groovy b/build/ci/jenkins/Scale.groovy index 00f678eabd..47305bac19 100644 --- a/build/ci/jenkins/Scale.groovy +++ b/build/ci/jenkins/Scale.groovy @@ -54,7 +54,10 @@ pipeline { dir ('tests/python_client/scale') { script { // pytest run scale case in parallel - sh 'pytest . -n 5 -v -s' + sh 'pytest test_data_node_scale.py -v -s' + sh 'pytest test_index_node_scale.py -n 2 -v -s' + sh 'pytest test_proxy_scale.py -v -s' + sh 'pytest test_query_node_scale.py -n 3 -v -s' } } } diff --git a/tests/python_client/scale/constants.py b/tests/python_client/scale/constants.py index 912c7e6c14..872e1f74ab 100644 --- a/tests/python_client/scale/constants.py +++ b/tests/python_client/scale/constants.py @@ -1,6 +1,6 @@ # scale object # IMAGE_REPOSITORY = "registry.milvus.io/milvus/milvus" # repository of milvus image -IMAGE_REPOSITORY = "milvusdb/milvus" +IMAGE_REPOSITORY = "harbor.milvus.io/dockerhub/milvusdb/milvus" IMAGE_TAG = "master-20211227-b022615" # tag of milvus image # NAMESPACE = "chaos-testing" # namespace NAMESPACE = "qa" diff --git a/tests/python_client/utils/util_pymilvus.py b/tests/python_client/utils/util_pymilvus.py index 01be336b25..1fb18b9167 100644 --- a/tests/python_client/utils/util_pymilvus.py +++ b/tests/python_client/utils/util_pymilvus.py @@ -1040,7 +1040,7 @@ def get_tags(url, token): return [] -def get_master_tags(tags_list): +def get_master_tags(tags_list, tag_prefix="master", tag_latest="master-latest"): _list = [] if not isinstance(tags_list, list): @@ -1048,7 +1048,7 @@ def get_master_tags(tags_list): return _list for tag in tags_list: - if "master" in tag and tag != "master-latest": + if tag_prefix in tag and tag != tag_latest: _list.append(tag) return _list @@ -1073,7 +1073,7 @@ def get_config_digest(url, token): return "" -def get_latest_tag(limit=100): +def get_latest_tag(limit=100, tag_prefix="master", tag_latest="master-latest"): service = "registry.docker.io" repository = "milvusdb/milvus" @@ -1081,9 +1081,9 @@ def get_latest_tag(limit=100): tags_url = "https://index.docker.io/v2/%s/tags/list" % repository tag_url = "https://index.docker.io/v2/milvusdb/milvus/manifests/" - master_latest_digest = get_config_digest(tag_url + "master-latest", get_token(auth_url)) + master_latest_digest = get_config_digest(tag_url + tag_latest, get_token(auth_url)) tags = get_tags(tags_url, get_token(auth_url)) - tag_list = get_master_tags(tags) + tag_list = get_master_tags(tags, tag_prefix=tag_prefix, tag_latest=tag_latest) latest_tag = "" for i in range(1, len(tag_list) + 1): @@ -1096,7 +1096,7 @@ def get_latest_tag(limit=100): break if latest_tag == "": - latest_tag = "master-latest" + latest_tag = tag_latest print("Can't find the latest image name") print("The image name used is %s" % str(latest_tag)) return latest_tag