From e6daff49a6f0db5e1a6d762b48fe44c75b24e614 Mon Sep 17 00:00:00 2001 From: zhuwenxing Date: Wed, 31 Jan 2024 14:11:04 +0800 Subject: [PATCH] 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 --- .../chaos/testcases/test_all_collections_after_chaos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/python_client/chaos/testcases/test_all_collections_after_chaos.py b/tests/python_client/chaos/testcases/test_all_collections_after_chaos.py index 951c60d2d4..d5b9f2c4cb 100644 --- a/tests/python_client/chaos/testcases/test_all_collections_after_chaos.py +++ b/tests/python_client/chaos/testcases/test_all_collections_after_chaos.py @@ -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