Skip to content

Commit

Permalink
test: fix flaky test case test_ha_backup_deletion_recovery
Browse files Browse the repository at this point in the history
address the backup volume might not have been created yet

longhorn/longhorn#8231

Signed-off-by: Roger Yao <[email protected]>
  • Loading branch information
roger-ryao authored and yangchiu committed Mar 27, 2024
1 parent c38eea7 commit fdef8d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions manager/integration/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3129,10 +3129,10 @@ def wait_for_backup_volume_backing_image_synced(
completed = False
for _ in range(retry_count):
bv = find_backup_volume(client, volume_name)
assert bv is not None
if bv.backingImageName == backing_image:
completed = True
break
if bv is not None:
if bv.backingImageName == backing_image:
completed = True
break
time.sleep(RETRY_BACKUP_INTERVAL)
assert completed is True, f" Backup Volume = {bv}," \
f" Backing Image = {backing_image}," \
Expand Down

0 comments on commit fdef8d2

Please sign in to comment.