Add timeout for test case (#14439)

Signed-off-by: Jenny Li <jing.li@zilliz.com>
This commit is contained in:
Jenny Li 2021-12-28 18:42:02 +08:00 committed by GitHub
parent 123c926a90
commit e8e7f46705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,7 @@
int total_timeout_minutes = 120
int e2e_timeout_seconds = 70 * 60
def imageTag=''
int case_timeout_seconds = 10 * 60
pipeline {
options {
timestamps()
@ -151,6 +151,7 @@ pipeline {
MILVUS_HELM_RELEASE_NAME="${release_name}" \
MILVUS_CLUSTER_ENABLED="${clusterEnabled}" \
TEST_TIMEOUT="${e2e_timeout_seconds}" \
CASE_TIMEOUT="${case_timeout_seconds}"\
./ci_e2e.sh "-n 6 -x --tags L0 L1"
"""
} else {

View File

@ -62,10 +62,12 @@ if [ ! -d "${CI_LOG_PATH}" ]; then
fi
trace "prepare e2e test" install_pytest_requirements
CASE_TIMEOUT=${CASE_TIMEOUT:-600}
if [[ -n "${TEST_TIMEOUT:-}" ]]; then
timeout "${TEST_TIMEOUT}" pytest --host ${MILVUS_SERVICE_NAME} --port ${MILVUS_SERVICE_PORT} \
--html=${CI_LOG_PATH}/report.html --self-contained-html ${@:-}
--timeout ${CASE_TIMEOUT} --html=${CI_LOG_PATH}/report.html --self-contained-html ${@:-}
else
pytest --host ${MILVUS_SERVICE_NAME} --port ${MILVUS_SERVICE_PORT} \
--html=${CI_LOG_PATH}/report.html --self-contained-html ${@:-}
--timeout ${CASE_TIMEOUT} --html=${CI_LOG_PATH}/report.html --self-contained-html ${@:-}
fi