Modify test cases for instability of num_entities (#27198)

Signed-off-by: nico <cheng.yuan@zilliz.com>
pull/27244/head
nico 2023-09-19 21:51:25 +08:00 committed by GitHub
parent 5c0b035c43
commit d77984c211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 8 deletions

View File

@ -962,7 +962,6 @@ class TestDeleteOperation(TestcaseBase):
expr = f'{ct.default_int64_field_name} in {ids[i * batch: (i + 1) * batch]}'
res, _ = collection_w.delete(expr)
assert res.delete_count == batch
assert collection_w.num_entities == tmp_nb
# query with all ids
expr = f'{ct.default_int64_field_name} in {ids}'
@ -1593,7 +1592,6 @@ class TestDeleteString(TestcaseBase):
expr = expr.replace("'", "\"")
res, _ = collection_w.delete(expr)
assert res.delete_count == batch
assert collection_w.num_entities == tmp_nb
# query with all ids
expr = f'{ct.default_string_field_name} in {ids}'

View File

@ -299,13 +299,11 @@ class TestInsertParams(TestcaseBase):
collection_w = self.init_collection_wrap(name=c_name)
nb = 10
df = cf.gen_default_dataframe_data(nb)
new_float_value = pd.Series(
data=[float(i) for i in range(nb)], dtype="float64")
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: 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)
ct.err_msg: "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)
@pytest.mark.tags(CaseLabel.L2)
def test_insert_value_less(self):

View File

@ -2760,7 +2760,7 @@ class TestUtilityRBAC(TestcaseBase):
self.utility_wrap.init_role("public")
self.utility_wrap.role_grant("Collection", c_name, "Insert")
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.tags(CaseLabel.RBAC)
def test_revoke_user_after_delete_user(self, host, port):
"""
target: test revoke user with deleted user