Skip to content

Commit

Permalink
test: update timeout of load in ci cases (#37596)
Browse files Browse the repository at this point in the history
action for
#37166 (comment)

Signed-off-by: zhuwenxing <[email protected]>
  • Loading branch information
zhuwenxing authored Nov 16, 2024
1 parent 4820dd7 commit 3cdb485
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/restful_client_v2/base/testbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,12 @@ def update_database(self, db_name="default"):
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)

0 comments on commit 3cdb485

Please sign in to comment.