mirror of https://github.com/milvus-io/milvus.git
parent
56a6559fe7
commit
5e4ae757f5
|
@ -2219,7 +2219,7 @@ class TestLoadCollection(TestcaseBase):
|
|||
c_name = cf.gen_unique_str()
|
||||
collection_wr = self.init_collection_wrap(name=c_name)
|
||||
collection_wr.drop()
|
||||
error = {ct.err_code: 1,
|
||||
error = {ct.err_code: 4,
|
||||
ct.err_msg: "DescribeCollection failed: can't find collection: %s" % c_name}
|
||||
collection_wr.load(check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
|
@ -2234,7 +2234,7 @@ class TestLoadCollection(TestcaseBase):
|
|||
c_name = cf.gen_unique_str()
|
||||
collection_wr = self.init_collection_wrap(name=c_name)
|
||||
collection_wr.drop()
|
||||
error = {ct.err_code: 1,
|
||||
error = {ct.err_code: 4,
|
||||
ct.err_msg: "DescribeCollection failed: can't find collection: %s" % c_name}
|
||||
collection_wr.release(check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
|
@ -2595,7 +2595,7 @@ class TestLoadCollection(TestcaseBase):
|
|||
collection_wr.load()
|
||||
collection_wr.release()
|
||||
collection_wr.drop()
|
||||
error = {ct.err_code: 1,
|
||||
error = {ct.err_code: 4,
|
||||
ct.err_msg: "DescribeCollection failed: can't find collection: %s" % c_name}
|
||||
collection_wr.load(check_task=CheckTasks.err_res, check_items=error)
|
||||
collection_wr.release(check_task=CheckTasks.err_res, check_items=error)
|
||||
|
@ -2613,7 +2613,7 @@ class TestLoadCollection(TestcaseBase):
|
|||
collection_wr.create_index(ct.default_float_vec_field_name, index_params=ct.default_flat_index)
|
||||
collection_wr.load()
|
||||
collection_wr.drop()
|
||||
error = {ct.err_code: 0,
|
||||
error = {ct.err_code: 4,
|
||||
ct.err_msg: "can't find collection"}
|
||||
collection_wr.release(check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
|
|
|
@ -571,7 +571,7 @@ class TestDeleteOperation(TestcaseBase):
|
|||
collection_w = self.init_collection_general(prefix, nb=tmp_nb, insert_data=True)[0]
|
||||
|
||||
# raise exception
|
||||
error = {ct.err_code: 1,
|
||||
error = {ct.err_code: 15,
|
||||
ct.err_msg: f"partitionID of partitionName:{ct.default_tag} can not be find"}
|
||||
collection_w.delete(tmp_expr, partition_name=ct.default_tag,
|
||||
check_task=CheckTasks.err_res, check_items=error)
|
||||
|
@ -1140,6 +1140,31 @@ class TestDeleteOperation(TestcaseBase):
|
|||
|
||||
collection_w.query(expr, check_task=CheckTasks.check_query_empty)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.skip("issue #26820")
|
||||
@pytest.mark.parametrize("consistency_level", ["Bounded", "Session", "Eventually"])
|
||||
def test_delete_flush_query_consistency_not_strong(self, consistency_level):
|
||||
"""
|
||||
target: test delete, flush and query with Consistency level not strong
|
||||
method: 1.delete ids
|
||||
2.flush
|
||||
3.query with Consistency level not strong
|
||||
expected: query successfully
|
||||
"""
|
||||
# init collection
|
||||
collection_w = self.init_collection_general(prefix, True)[0]
|
||||
|
||||
# delete and flush
|
||||
delete_ids = [i for i in range(ct.default_nb // 2)]
|
||||
delete_expr = f"{ct.default_int64_field_name} in {delete_ids}"
|
||||
res = collection_w.delete(delete_expr)[0]
|
||||
assert res.delete_count == ct.default_nb // 2
|
||||
collection_w.flush()
|
||||
|
||||
# query with Consistency level not strong
|
||||
collection_w.query(expr=delete_expr, consistency_level=consistency_level,
|
||||
check_task=CheckTasks.check_query_empty)
|
||||
|
||||
|
||||
class TestDeleteString(TestcaseBase):
|
||||
"""
|
||||
|
|
|
@ -302,7 +302,8 @@ class TestInsertParams(TestcaseBase):
|
|||
new_float_value = pd.Series(
|
||||
data=[float(i) for i in range(nb)], dtype="float64")
|
||||
df[df.columns[1]] = new_float_value
|
||||
error = {ct.err_code: 5}
|
||||
error = {ct.err_code: 1,
|
||||
ct.err_code: "The data type of field float doesn't match, expected: FLOAT, got DOUBLE"}
|
||||
collection_w.insert(
|
||||
data=df, check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
|
@ -391,7 +392,8 @@ class TestInsertParams(TestcaseBase):
|
|||
float_values = [np.float32(i) for i in range(nb)]
|
||||
float_vec_values = cf.gen_vectors(nb, ct.default_dim)
|
||||
data = [float_values, int_values, float_vec_values]
|
||||
error = {ct.err_code: 5}
|
||||
error = {ct.err_code: 1,
|
||||
ct.err_msg: "The data type of field int64 doesn't match, expected: INT64, got FLOAT"}
|
||||
collection_w.insert(
|
||||
data=data, check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
|
@ -1263,7 +1265,7 @@ class TestInsertInvalid(TestcaseBase):
|
|||
collection_name = cf.gen_unique_str(prefix)
|
||||
collection_w = self.init_collection_wrap(name=collection_name)
|
||||
df = cf.gen_default_list_data(ct.default_nb)
|
||||
error = {ct.err_code: 1, 'err_msg': "partition name is illegal"}
|
||||
error = {ct.err_code: 15, 'err_msg': "partition not found"}
|
||||
mutation_res, _ = collection_w.insert(data=df, partition_name="p", check_task=CheckTasks.err_res,
|
||||
check_items=error)
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ class TestUtilityParams(TestcaseBase):
|
|||
self.collection_wrap.construct_from_dataframe(c_name, df, primary_field=ct.default_int64_field_name)
|
||||
self.collection_wrap.create_index(ct.default_float_vec_field_name, index_params=ct.default_flat_index)
|
||||
self.collection_wrap.load()
|
||||
error = {ct.err_code: 1, ct.err_msg: "describe collection failed: can't find collection"}
|
||||
error = {ct.err_code: 4, ct.err_msg: "collection default:not_existed_name: collection not found"}
|
||||
self.utility_wrap.loading_progress("not_existed_name", check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
|
@ -285,7 +285,7 @@ class TestUtilityParams(TestcaseBase):
|
|||
self.utility_wrap.wait_for_loading_complete(
|
||||
c_name,
|
||||
check_task=CheckTasks.err_res,
|
||||
check_items={ct.err_code: 1, ct.err_msg: "can't find collection"})
|
||||
check_items={ct.err_code: 4, ct.err_msg: f"collection default:{c_name}: collection not found"})
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_wait_for_loading_partition_not_existed(self):
|
||||
|
@ -601,9 +601,9 @@ class TestUtilityParams(TestcaseBase):
|
|||
new_collection_name = cf.gen_unique_str(prefix)
|
||||
self.utility_wrap.rename_collection(old_collection_name, new_collection_name,
|
||||
check_task=CheckTasks.err_res,
|
||||
check_items={"err_code": 1,
|
||||
"err_msg": "can't find collection: {}".format(
|
||||
collection_w.name)})
|
||||
check_items={"err_code": 4,
|
||||
"err_msg": "collection 1:test_collection_non_exist: "
|
||||
"collection not found"})
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
def test_rename_collection_existed_collection_name(self):
|
||||
|
|
Loading…
Reference in New Issue