mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] conftest: there can be some delay on repo content initialization
Seems to be a new github weirdness: when forking a repo, when hitting it fast enough it's apparently possible to see the repository in an incomplete state (without its content). Obviously this causes tests to fail. Complete the post-fork testing by listing the branches of the fork, and considering the repo created once we see a non-empty list (the source repo should always have at least one branch, which should be copied over when forking).
This commit is contained in:
parent
f7a12c6359
commit
9c6380c480
@ -732,6 +732,12 @@ class Repo:
|
||||
raise TimeoutError("No response for repo %s over 60s" % repo_name)
|
||||
time.sleep(1)
|
||||
|
||||
# wait for the branches (which should have been copied over) to be visible
|
||||
while not s.get(f'{repo_url}/branches').json():
|
||||
if time.time() > limit:
|
||||
raise TimeoutError("No response for repo %s over 60s" % repo_name)
|
||||
time.sleep(1)
|
||||
|
||||
return Repo(s, repo_name, self._repos)
|
||||
|
||||
def get_pr(self, number):
|
||||
|
Loading…
Reference in New Issue
Block a user