test: fix query result verification (#30351)

fix query result verification:
changed the query expression and adopted a more lenient validation
method to address the issue of not being able to guarantee the retrieval
of specific IDs due to frequent deletion operation

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2024-01-31 14:11:04 +08:00 committed by GitHub
parent fb9d64ab1e
commit e6daff49a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -132,9 +132,9 @@ class TestAllCollection(TestcaseBase):
assert len(res[0]) <= topk
# query
term_expr = f'{int64_field_name} in [1, 2, 3, 4]'
term_expr = f'{int64_field_name} > -3000'
t0 = time.time()
res, _ = collection_w.query(term_expr)
tt = time.time() - t0
log.info(f"assert query result {len(res)}: {tt}")
assert len(res) >= 4
assert len(res) > 0