Skip to content

Commit

Permalink
tests: fix race condition in updates test
Browse files Browse the repository at this point in the history
Wait for the local repo to become available - python3 -m http may take a
moment, and if the other parts are quick, the test would fail on
connection refused error.
  • Loading branch information
marmarek committed Dec 10, 2024
1 parent 430b633 commit 6b49ea6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qubes/tests/integ/vm_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,13 @@ def create_repo_and_serve(self):
"Template {} not supported by this test".format(self.template)
)

# wait for the repo to become reachable
self.loop.run_until_complete(
self.netvm_repo.run_for_stdio(
"while ! curl http://localhost:8080/ >/dev/null; do sleep 0.5; done"
)
)

def add_update_to_repo(self):
"""
:type self: qubes.tests.SystemTestCase | VmUpdatesMixin
Expand Down

0 comments on commit 6b49ea6

Please sign in to comment.