未验证 提交 0fa4ec48 编写于 作者: T ThreadDao 提交者: GitHub

[test] Update test case for indexing process assert (#16432)

Signed-off-by: NThreadDao <yufen.zong@zilliz.com>
上级 7a338473
import threading
import time
import pytest
from base.client_base import TestcaseBase
......@@ -701,9 +702,14 @@ class TestUtilityBase(TestcaseBase):
data = cf.gen_default_list_data(nb)
cw.insert(data=data)
cw.create_index(default_field_name, default_index_params)
res, _ = self.utility_wrap.index_building_progress(c_name)
assert (0 < res['indexed_rows'] <= nb)
assert res['total_rows'] == nb
start = time.time()
while True:
time.sleep(1)
res, _ = self.utility_wrap.index_building_progress(c_name)
if 0 < res['indexed_rows'] <= nb:
break
if time.time() - start > 5:
raise BaseException(1, f"Index build completed in more than 5s")
@pytest.mark.tags(CaseLabel.L2)
def test_wait_index_collection_not_existed(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册