mirror of https://github.com/milvus-io/milvus.git
test: add timeout for import testcases (#33006)
add timeout for import testcases --------- Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>pull/33024/head
parent
efdbd8e7c1
commit
9e3f3d99f7
|
@ -2,7 +2,7 @@ import ujson
|
||||||
import json
|
import json
|
||||||
from pymilvus.grpc_gen import milvus_pb2 as milvus_types
|
from pymilvus.grpc_gen import milvus_pb2 as milvus_types
|
||||||
from pymilvus import connections
|
from pymilvus import connections
|
||||||
|
from utils.util_log import test_log as log
|
||||||
sys_info_req = ujson.dumps({"metric_type": "system_info"})
|
sys_info_req = ujson.dumps({"metric_type": "system_info"})
|
||||||
sys_statistics_req = ujson.dumps({"metric_type": "system_statistics"})
|
sys_statistics_req = ujson.dumps({"metric_type": "system_statistics"})
|
||||||
sys_logs_req = ujson.dumps({"metric_type": "system_logs"})
|
sys_logs_req = ujson.dumps({"metric_type": "system_logs"})
|
||||||
|
@ -18,10 +18,7 @@ class MilvusSys:
|
||||||
# TODO: for now it only supports non_orm style API for getMetricsRequest
|
# TODO: for now it only supports non_orm style API for getMetricsRequest
|
||||||
req = milvus_types.GetMetricsRequest(request=sys_info_req)
|
req = milvus_types.GetMetricsRequest(request=sys_info_req)
|
||||||
self.sys_info = self.handler._stub.GetMetrics(req, wait_for_ready=True, timeout=None)
|
self.sys_info = self.handler._stub.GetMetrics(req, wait_for_ready=True, timeout=None)
|
||||||
req = milvus_types.GetMetricsRequest(request=sys_statistics_req)
|
log.debug(f"sys_info: {self.sys_info}")
|
||||||
self.sys_statistics = self.handler._stub.GetMetrics(req, wait_for_ready=True, timeout=None)
|
|
||||||
req = milvus_types.GetMetricsRequest(request=sys_logs_req)
|
|
||||||
self.sys_logs = self.handler._stub.GetMetrics(req, wait_for_ready=True, timeout=None)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def build_version(self):
|
def build_version(self):
|
||||||
|
|
|
@ -1356,7 +1356,7 @@ class TestBulkInsert(TestcaseBaseBulkInsert):
|
||||||
force=True,
|
force=True,
|
||||||
)
|
)
|
||||||
self._connect()
|
self._connect()
|
||||||
c_name = cf.gen_unique_str("bulk_parkey")
|
c_name = cf.gen_unique_str("bulk_partition_key")
|
||||||
fields = [
|
fields = [
|
||||||
cf.gen_int64_field(name=df.pk_field, is_primary=True),
|
cf.gen_int64_field(name=df.pk_field, is_primary=True),
|
||||||
cf.gen_float_vec_field(name=df.vec_field, dim=dim),
|
cf.gen_float_vec_field(name=df.vec_field, dim=dim),
|
||||||
|
@ -1550,7 +1550,7 @@ class TestBulkInsert(TestcaseBaseBulkInsert):
|
||||||
force=True
|
force=True
|
||||||
)
|
)
|
||||||
self._connect()
|
self._connect()
|
||||||
c_name = cf.gen_unique_str("bulk_parkey")
|
c_name = cf.gen_unique_str("bulk_partition_key")
|
||||||
fields = [
|
fields = [
|
||||||
cf.gen_int64_field(name=df.pk_field, is_primary=True),
|
cf.gen_int64_field(name=df.pk_field, is_primary=True),
|
||||||
cf.gen_float_vec_field(name=df.vec_field, dim=dim),
|
cf.gen_float_vec_field(name=df.vec_field, dim=dim),
|
||||||
|
|
|
@ -66,6 +66,23 @@ echo "prepare e2e test"
|
||||||
install_pytest_requirements
|
install_pytest_requirements
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cd ${ROOT}/tests/python_client
|
||||||
|
# Run bulk insert test
|
||||||
|
# if MILVUS_HELM_RELEASE_NAME contains "msop", then it is one pod mode, skip the bulk insert test
|
||||||
|
if [[ "${MILVUS_HELM_RELEASE_NAME}" != *"msop"* ]]; then
|
||||||
|
if [[ -n "${TEST_TIMEOUT:-}" ]]; then
|
||||||
|
|
||||||
|
timeout "${TEST_TIMEOUT}" pytest testcases/test_bulk_insert.py --timeout=300 --host ${MILVUS_SERVICE_NAME} --port ${MILVUS_SERVICE_PORT} --minio_host ${MINIO_SERVICE_NAME} \
|
||||||
|
--html=${CI_LOG_PATH}/report_bulk_insert.html --self-contained-html
|
||||||
|
else
|
||||||
|
pytest testcases/test_bulk_insert.py --timeout=300 --host ${MILVUS_SERVICE_NAME} --port ${MILVUS_SERVICE_PORT} --minio_host ${MINIO_SERVICE_NAME} \
|
||||||
|
--html=${CI_LOG_PATH}/report_bulk_insert.html --self-contained-html
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Run restful test v1
|
# Run restful test v1
|
||||||
|
|
||||||
cd ${ROOT}/tests/restful_client
|
cd ${ROOT}/tests/restful_client
|
||||||
|
@ -122,10 +139,10 @@ fi
|
||||||
if [[ "${MILVUS_HELM_RELEASE_NAME}" != *"msop"* ]]; then
|
if [[ "${MILVUS_HELM_RELEASE_NAME}" != *"msop"* ]]; then
|
||||||
if [[ -n "${TEST_TIMEOUT:-}" ]]; then
|
if [[ -n "${TEST_TIMEOUT:-}" ]]; then
|
||||||
|
|
||||||
timeout "${TEST_TIMEOUT}" pytest testcases/test_bulk_insert.py --host ${MILVUS_SERVICE_NAME} --port ${MILVUS_SERVICE_PORT} --minio_host ${MINIO_SERVICE_NAME} \
|
timeout "${TEST_TIMEOUT}" pytest testcases/test_bulk_insert.py --timeout=300 --host ${MILVUS_SERVICE_NAME} --port ${MILVUS_SERVICE_PORT} --minio_host ${MINIO_SERVICE_NAME} \
|
||||||
--html=${CI_LOG_PATH}/report_bulk_insert.html --self-contained-html
|
--html=${CI_LOG_PATH}/report_bulk_insert.html --self-contained-html
|
||||||
else
|
else
|
||||||
pytest testcases/test_bulk_insert.py --host ${MILVUS_SERVICE_NAME} --port ${MILVUS_SERVICE_PORT} --minio_host ${MINIO_SERVICE_NAME} \
|
pytest testcases/test_bulk_insert.py --timeout=300 --host ${MILVUS_SERVICE_NAME} --port ${MILVUS_SERVICE_PORT} --minio_host ${MINIO_SERVICE_NAME} \
|
||||||
--html=${CI_LOG_PATH}/report_bulk_insert.html --self-contained-html
|
--html=${CI_LOG_PATH}/report_bulk_insert.html --self-contained-html
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue