From df88622dc622acd1a47242dce9cdf96a139d4708 Mon Sep 17 00:00:00 2001 From: del-zhenwu <56623710+del-zhenwu@users.noreply.github.com> Date: Wed, 20 May 2020 18:51:50 +0800 Subject: [PATCH] test level 3: restart (#2384) * test level 3: restart Signed-off-by: zw * add namepsace Signed-off-by: zw * update Signed-off-by: zw * update Signed-off-by: zw * Update utils.py Signed-off-by: zw * Update test_level_3.py Signed-off-by: zw * Update Jenkinsfile Signed-off-by: zw * debug Signed-off-by: zw * debug Signed-off-by: zw * debug Signed-off-by: zw * debug Signed-off-by: zw * clean compile warning (#2380) Signed-off-by: yudong.cai Signed-off-by: zw * delete pod Signed-off-by: zw * update Signed-off-by: zw * debug Signed-off-by: zw * debug Signed-off-by: zw * recover Signed-off-by: zw Co-authored-by: zw Co-authored-by: Cai Yudong --- ci/jenkins/step/singleDevTest.groovy | 5 +++-- tests/milvus_python_test/conftest.py | 14 +++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ci/jenkins/step/singleDevTest.groovy b/ci/jenkins/step/singleDevTest.groovy index f1ed06b9..60464cb3 100644 --- a/ci/jenkins/step/singleDevTest.groovy +++ b/ci/jenkins/step/singleDevTest.groovy @@ -7,7 +7,7 @@ timeout(time: 120, unit: 'MINUTES') { sh 'helm dep update' retry(3) { try { - sh "helm install --wait --timeout 300s --set image.repository=registry.zilliz.com/milvus/engine --set image.tag=${DOCKER_VERSION} --set image.pullPolicy=Always --set service.type=ClusterIP -f ci/db_backend/mysql_${BINARY_VERSION}_values.yaml -f ci/filebeat/values.yaml --namespace milvus ${env.HELM_RELEASE_NAME} ." + sh "helm install --wait --timeout 300s --set image.repository=registry.zilliz.com/milvus/engine --set persistence.enabled=true --set image.tag=${DOCKER_VERSION} --set image.pullPolicy=Always --set service.type=ClusterIP -f ci/db_backend/mysql_${BINARY_VERSION}_values.yaml -f ci/filebeat/values.yaml --namespace milvus ${env.HELM_RELEASE_NAME} ." } catch (exc) { def helmStatusCMD = "helm get manifest --namespace milvus ${env.HELM_RELEASE_NAME} | kubectl describe -n milvus -f - && \ kubectl logs --namespace milvus -l \"app.kubernetes.io/name=milvus,app.kubernetes.io/instance=${env.HELM_RELEASE_NAME}\" -c milvus && \ @@ -21,6 +21,7 @@ timeout(time: 120, unit: 'MINUTES') { dir ("tests/milvus_python_test") { // sh 'python3 -m pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com' sh 'python3 -m pip install -r requirements.txt' - sh "pytest . --alluredir=\"test_out/dev/single/mysql\" --level=1 --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local" + sh "pytest . --alluredir=\"test_out/dev/single/mysql\" --level=1 --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local --service ${env.HELM_RELEASE_NAME}" + // sh "pytest test_restart.py --alluredir=\"test_out/dev/single/mysql\" --level=3 --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local --service ${env.HELM_RELEASE_NAME}" } } diff --git a/tests/milvus_python_test/conftest.py b/tests/milvus_python_test/conftest.py index 0e6f879d..70f5bb94 100644 --- a/tests/milvus_python_test/conftest.py +++ b/tests/milvus_python_test/conftest.py @@ -115,7 +115,7 @@ def collection(request, connect): def teardown(): status, collection_names = connect.list_collections() for collection_name in collection_names: - connect.drop_collection(collection_name, timeout=delete_timeout) + connect.drop_collection(collection_name) # connect.drop_collection(collection_name) request.addfinalizer(teardown) @@ -142,7 +142,7 @@ def ip_collection(request, connect): def teardown(): status, collection_names = connect.list_collections() for collection_name in collection_names: - connect.drop_collection(collection_name, timeout=delete_timeout) + connect.drop_collection(collection_name) # connect.drop_collection(collection_name) request.addfinalizer(teardown) @@ -169,7 +169,7 @@ def jac_collection(request, connect): def teardown(): status, collection_names = connect.list_collections() for collection_name in collection_names: - connect.drop_collection(collection_name, timeout=delete_timeout) + connect.drop_collection(collection_name) # connect.drop_collection(collection_name) request.addfinalizer(teardown) @@ -195,7 +195,7 @@ def ham_collection(request, connect): def teardown(): status, collection_names = connect.list_collections() for collection_name in collection_names: - connect.drop_collection(collection_name, timeout=delete_timeout) + connect.drop_collection(collection_name) # connect.drop_collection(collection_name) request.addfinalizer(teardown) @@ -221,7 +221,7 @@ def tanimoto_collection(request, connect): def teardown(): status, collection_names = connect.list_collections() for collection_name in collection_names: - connect.drop_collection(collection_name, timeout=delete_timeout) + connect.drop_collection(collection_name) # connect.drop_collection(collection_name) request.addfinalizer(teardown) @@ -246,7 +246,7 @@ def substructure_collection(request, connect): def teardown(): status, collection_names = connect.list_collections() for collection_name in collection_names: - connect.drop_collection(collection_name, timeout=delete_timeout) + connect.drop_collection(collection_name) # connect.drop_collection(collection_name) request.addfinalizer(teardown) @@ -271,7 +271,7 @@ def superstructure_collection(request, connect): def teardown(): status, collection_names = connect.list_collections() for collection_name in collection_names: - connect.drop_collection(collection_name, timeout=delete_timeout) + connect.drop_collection(collection_name) # connect.drop_collection(collection_name) request.addfinalizer(teardown) -- GitLab