mirror of https://github.com/milvus-io/milvus.git
Update version of pymilvus and fix ci cases (#16527)
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>pull/16540/head
parent
9521453938
commit
426f607637
|
@ -9,7 +9,7 @@ allure-pytest==2.7.0
|
|||
pytest-print==0.2.1
|
||||
pytest-level==0.1.1
|
||||
pytest-xdist==2.2.1
|
||||
pymilvus==2.0.2.dev10
|
||||
pymilvus==2.1.0.dev26
|
||||
pytest-rerunfailures==9.1.1
|
||||
git+https://github.com/Projectplace/pytest-tags
|
||||
ndg-httpsclient
|
||||
|
|
|
@ -56,7 +56,7 @@ class TestDataNodeScale:
|
|||
else:
|
||||
# log.warning(f'Deploy {release_name} timeout and ready to uninstall')
|
||||
# mic.uninstall(release_name, namespace=constants.NAMESPACE)
|
||||
raise BaseException(f'Milvus healthy timeout 1200s')
|
||||
raise MilvusException(message=f'Milvus healthy timeout 1200s')
|
||||
|
||||
try:
|
||||
# connect
|
||||
|
|
|
@ -52,7 +52,7 @@ class TestIndexNodeScale:
|
|||
else:
|
||||
# log.warning(f'Deploy {release_name} timeout and ready to uninstall')
|
||||
# mic.uninstall(release_name, namespace=constants.NAMESPACE)
|
||||
raise BaseException(f'Milvus healthy timeout 1200s')
|
||||
raise MilvusException(message=f'Milvus healthy timeout 1200s')
|
||||
|
||||
try:
|
||||
# connect
|
||||
|
@ -144,7 +144,7 @@ class TestIndexNodeScale:
|
|||
else:
|
||||
# log.warning(f'Deploy {release_name} timeout and ready to uninstall')
|
||||
# mic.uninstall(release_name, namespace=constants.NAMESPACE)
|
||||
raise BaseException(f'Milvus healthy timeout 1200s')
|
||||
raise MilvusException(message=f'Milvus healthy timeout 1200s')
|
||||
|
||||
try:
|
||||
# connect
|
||||
|
@ -204,4 +204,4 @@ class TestIndexNodeScale:
|
|||
label = f"app.kubernetes.io/instance={release_name}"
|
||||
log.info('Start to export milvus pod logs')
|
||||
read_pod_log(namespace=constants.NAMESPACE, label_selector=label, release_name=release_name)
|
||||
mic.uninstall(release_name, namespace=constants.NAMESPACE)
|
||||
mic.uninstall(release_name, namespace=constants.NAMESPACE)
|
||||
|
|
|
@ -57,7 +57,7 @@ class TestProxyScale:
|
|||
else:
|
||||
# log.warning(f'Deploy {release_name} timeout and ready to uninstall')
|
||||
# mic.uninstall(release_name, namespace=constants.NAMESPACE)
|
||||
raise BaseException(f'Milvus healthy timeout 1200s')
|
||||
raise MilvusException(message=f'Milvus healthy timeout 1200s')
|
||||
|
||||
try:
|
||||
c_name = cf.gen_unique_str(prefix)
|
||||
|
|
|
@ -56,7 +56,7 @@ class TestQueryNodeScale:
|
|||
else:
|
||||
# log.warning(f'Deploy {release_name} timeout and ready to uninstall')
|
||||
# mic.uninstall(release_name, namespace=constants.NAMESPACE)
|
||||
raise BaseException(f'Milvus healthy timeout 1200s')
|
||||
raise MilvusException(message=f'Milvus healthy timeout 1200s')
|
||||
|
||||
try:
|
||||
# connect
|
||||
|
@ -134,4 +134,4 @@ class TestQueryNodeScale:
|
|||
label = f"app.kubernetes.io/instance={release_name}"
|
||||
log.info('Start to export milvus pod logs')
|
||||
read_pod_log(namespace=constants.NAMESPACE, label_selector=label, release_name=release_name)
|
||||
mic.uninstall(release_name, namespace=constants.NAMESPACE)
|
||||
mic.uninstall(release_name, namespace=constants.NAMESPACE)
|
||||
|
|
|
@ -3,6 +3,7 @@ from time import time, sleep
|
|||
|
||||
import pytest
|
||||
from pymilvus.grpc_gen.common_pb2 import SegmentState
|
||||
from pymilvus.exceptions import MilvusException
|
||||
|
||||
from base.client_base import TestcaseBase
|
||||
from common import common_func as cf
|
||||
|
@ -457,7 +458,7 @@ class TestCompactionOperation(TestcaseBase):
|
|||
log.debug(segment_info)
|
||||
break
|
||||
if time() - start > cost:
|
||||
raise BaseException(1, f"Handoff after compact and index cost more than {cost}s")
|
||||
raise MilvusException(1, f"Handoff after compact and index cost more than {cost}s")
|
||||
|
||||
# verify search result
|
||||
search_res_two, _ = collection_w.search(df[ct.default_binary_vec_field_name][:ct.default_nq].to_list(),
|
||||
|
@ -854,7 +855,7 @@ class TestCompactionOperation(TestcaseBase):
|
|||
break
|
||||
end = time()
|
||||
if end - start > cost:
|
||||
raise BaseException(1, "Compact auto-merge more than 60s")
|
||||
raise MilvusException(1, "Compact auto-merge more than 60s")
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_compact_less_threshold_no_merge(self):
|
||||
|
|
|
@ -11,6 +11,7 @@ from common.code_mapping import IndexErrorMessage as iem
|
|||
|
||||
from utils.util_pymilvus import *
|
||||
from common.constants import *
|
||||
from pymilvus.exceptions import MilvusException
|
||||
|
||||
prefix = "index"
|
||||
default_schema = cf.gen_default_collection_schema()
|
||||
|
@ -430,7 +431,7 @@ class TestIndexBase:
|
|||
"""
|
||||
tmp_field_name = gen_unique_str()
|
||||
result = connect.insert(collection, default_entities)
|
||||
with pytest.raises(Exception) as e:
|
||||
with pytest.raises(MilvusException) as e:
|
||||
connect.create_index(collection, tmp_field_name, get_simple_index)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
|
@ -442,8 +443,7 @@ class TestIndexBase:
|
|||
"""
|
||||
tmp_field_name = "int64"
|
||||
result = connect.insert(collection, default_entities)
|
||||
with pytest.raises(Exception) as e:
|
||||
connect.create_index(collection, tmp_field_name, get_simple_index)
|
||||
connect.create_index(collection, tmp_field_name, get_simple_index)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
# @pytest.mark.timeout(BUILD_TIMEOUT)
|
||||
|
|
|
@ -6,6 +6,7 @@ import pandas as pd
|
|||
import random
|
||||
import pytest
|
||||
from pymilvus import Index, DataType
|
||||
from pymilvus.exceptions import MilvusException
|
||||
|
||||
from base.client_base import TestcaseBase
|
||||
from utils.util_log import test_log as log
|
||||
|
@ -219,7 +220,6 @@ class TestInsertParams(TestcaseBase):
|
|||
assert collection_w.num_entities == 1
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.xfail(reason="exception not Milvus Exception")
|
||||
def test_insert_dim_not_match(self):
|
||||
"""
|
||||
target: test insert with not match dim
|
||||
|
@ -235,7 +235,6 @@ class TestInsertParams(TestcaseBase):
|
|||
collection_w.insert(data=df, check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.xfail(reason="exception not Milvus Exception")
|
||||
def test_insert_binary_dim_not_match(self):
|
||||
"""
|
||||
target: test insert binary with dim not match
|
||||
|
@ -796,8 +795,8 @@ class TestInsertAsync(TestcaseBase):
|
|||
nb = 100000
|
||||
collection_w = self.init_collection_wrap(name=cf.gen_unique_str(prefix))
|
||||
df = cf.gen_default_dataframe_data(nb)
|
||||
future, _ = collection_w.insert(data=df, _async=True, _callback=assert_mutation_result, timeout=1)
|
||||
with pytest.raises(Exception):
|
||||
future, _ = collection_w.insert(data=df, _async=True, _callback=None, timeout=0.2)
|
||||
with pytest.raises(MilvusException):
|
||||
future.result()
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
|
@ -825,7 +824,7 @@ class TestInsertAsync(TestcaseBase):
|
|||
err_msg = "partitionID of partitionName:p can not be find"
|
||||
future, _ = collection_w.insert(data=df, partition_name="p", _async=True)
|
||||
future.done()
|
||||
with pytest.raises(Exception, match=err_msg):
|
||||
with pytest.raises(MilvusException, match=err_msg):
|
||||
future.result()
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
|
|
|
@ -2,6 +2,7 @@ import threading
|
|||
import time
|
||||
|
||||
import pytest
|
||||
from pymilvus.exceptions import MilvusException
|
||||
from base.client_base import TestcaseBase
|
||||
from base.utility_wrapper import ApiUtilityWrapper
|
||||
from utils.util_log import test_log as log
|
||||
|
@ -709,7 +710,7 @@ class TestUtilityBase(TestcaseBase):
|
|||
if 0 < res['indexed_rows'] <= nb:
|
||||
break
|
||||
if time.time() - start > 5:
|
||||
raise BaseException(1, f"Index build completed in more than 5s")
|
||||
raise MilvusException(1, f"Index build completed in more than 5s")
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_wait_index_collection_not_existed(self):
|
||||
|
@ -760,6 +761,7 @@ class TestUtilityBase(TestcaseBase):
|
|||
assert res["indexed_rows"] == nb
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.xfail(reason="https://github.com/milvus-io/milvus/issues/16468")
|
||||
def test_loading_progress_without_loading(self):
|
||||
"""
|
||||
target: test loading progress without loading
|
||||
|
@ -820,6 +822,7 @@ class TestUtilityBase(TestcaseBase):
|
|||
assert exp_res == res
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.xfail(reason="https://github.com/milvus-io/milvus/issues/16468")
|
||||
def test_loading_progress_after_release(self):
|
||||
"""
|
||||
target: test loading progress without loading
|
||||
|
@ -833,6 +836,7 @@ class TestUtilityBase(TestcaseBase):
|
|||
assert res == exp_res
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.xfail(reason="https://github.com/milvus-io/milvus/issues/16468")
|
||||
def test_loading_progress_with_release_partition(self):
|
||||
"""
|
||||
target: test loading progress after release part partitions
|
||||
|
@ -848,6 +852,7 @@ class TestUtilityBase(TestcaseBase):
|
|||
assert res[loading_progress] == '50%'
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.xfail(reason="https://github.com/milvus-io/milvus/issues/16468")
|
||||
def test_loading_progress_with_load_partition(self):
|
||||
"""
|
||||
target: test loading progress after load partition
|
||||
|
|
Loading…
Reference in New Issue