test: update timeout of load in ci cases (#37596)

action for
https://github.com/milvus-io/milvus/issues/37166#issuecomment-2469502955

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
pull/37740/head^2
zhuwenxing 2024-11-16 16:00:31 +08:00 committed by GitHub
parent 4820dd76e5
commit 3cdb485022
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -172,11 +172,12 @@ class TestBase(Base):
self.vector_client.db_name = db_name
self.import_job_client.db_name = db_name
def wait_load_completed(self, collection_name, db_name="default", timeout=60):
def wait_load_completed(self, collection_name, db_name="default", timeout=5):
t0 = time.time()
while True and time.time() - t0 < timeout:
rsp = self.collection_client.collection_describe(collection_name, db_name=db_name)
if "data" in rsp and "load" in rsp["data"] and rsp["data"]["load"] == "LoadStateLoaded":
logger.info(f"collection {collection_name} load completed in {time.time() - t0} seconds")
break
else:
time.sleep(5)
time.sleep(1)