[skip e2e]Add wait time when verifying the chaos is deleted (#26847)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2023-09-05 14:33:49 +08:00 committed by GitHub
parent fe7f7ea237
commit 1a80380a6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,10 +112,12 @@ class TestChaosApply:
log.info("chaos deleted")
res = chaos_res.list_all()
chaos_list = [r['metadata']['name'] for r in res['items']]
# verify the chaos is deleted
sleep(10)
res = chaos_res.list_all()
chaos_list = [r['metadata']['name'] for r in res['items']]
# verify the chaos is deleted in 60s
t0 = time.time()
while meta_name in chaos_list and time.time() - t0 < 60:
sleep(10)
res = chaos_res.list_all()
chaos_list = [r['metadata']['name'] for r in res['items']]
assert meta_name not in chaos_list
# wait all pods ready
t0 = time.time()