Skip to content

Commit

Permalink
Attempt to eliminate RAUC flakiness in e2e tests with a retry
Browse files Browse the repository at this point in the history
  • Loading branch information
yfyf committed Oct 21, 2024
1 parent 8076506 commit eb5b766
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions testing/end-to-end/tests/application/kiosk-persistence.nix
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,15 @@ async def check_web_storages_after_restart(page, t):
"TEST_VALUE cookie was not persisted"
)
def get_booted_slot():
def get_booted_slot(retries=3):
rauc_status = json.loads(playos.succeed("rauc status --output-format=json"))
return rauc_status['booted']
booted = rauc_status['booted']
# RAUC sometimes returns `null`, not sure why
if (booted is None) and retries > 0:
time.sleep(2)
return get_booted_slot(retries=retries-1)
else:
return booted
# ===== Test scenario
Expand Down

0 comments on commit eb5b766

Please sign in to comment.