Add retry to project quota GC test case (#17164)

Add retry to improve test case stability

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
Yang Jiao 2022-07-13 17:38:22 +08:00 committed by GitHub
parent ef8b8f0be7
commit 8d397d5a07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,9 +83,14 @@ Test Case - Project Quotas Control Under GC
GC Now
Create An New Project And Go Into Project project${d} storage_quota=${storage_quota} storage_quota_unit=${storage_quota_unit}
Cannot Push image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image_a}:${image_a_ver} err_msg=will exceed the configured upper limit of 200.0 MiB
GC Now
@{param} Create List project${d}
FOR ${n} IN RANGE 1 3
${out1} Run Keyword And Ignore Error GC Now
${latest_job_id}= Get Text ${latest_job_id_xpath}
Retry GC Should Be Successful ${latest_job_id} ${null}
@{param} Create List project${d}
Retry Keyword When Return Value Mismatch Get Project Storage Quota Text From Project Quotas List 0Byte of ${storage_quota}${storage_quota_unit} 60 @{param}
${out2} Run Keyword And Ignore Error Retry Keyword When Return Value Mismatch Get Project Storage Quota Text From Project Quotas List 0Byte of ${storage_quota}${storage_quota_unit} 2 @{param}
Exit For Loop If '${out2[0]}'=='PASS'
Sleep 1
END
Should Be Equal As Strings '${out2[0]}' 'PASS'
Close Browser