Skip to content

Commit

Permalink
test: refine load state check in restful test (#33861)
Browse files Browse the repository at this point in the history
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
  • Loading branch information
zhuwenxing committed Jun 14, 2024
1 parent 9b69601 commit a963afa
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,13 @@ def test_get_collection_load_state(self):
client.collection_describe(collection_name=name)
rsp = client.collection_load_state(collection_name=name)
assert rsp['code'] == 0
assert rsp['data']['loadState'] in ["LoadStateNotLoad", "LoadStateLoading"]
t0 = time.time()
while time.time() - t0 < 10:
rsp = client.collection_load_state(collection_name=name)
if rsp['data']['loadState'] != "LoadStateNotLoad":
break
time.sleep(1)
assert rsp['data']['loadState'] in ["LoadStateLoading", "LoadStateLoaded"]
# insert data
nb = 3000
data = get_data_by_payload(payload, nb)
Expand Down

0 comments on commit a963afa

Please sign in to comment.