mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] *: better cope with secondary rate limits
* the repository apparently takes a lot more time to propagate (randomly) now, so wait until we can *see* it * also add sleep after modification operations on the new repository Ideally this should be done a lot more ubiquitously, but for now this seems to more or less suffice.
This commit is contained in:
parent
08c4e94ca9
commit
3cdcba2f26
11
conftest.py
11
conftest.py
@ -403,6 +403,13 @@ def make_repo(capsys, request, config, tunnel, users):
|
||||
# 'allow_merge_commit': False,
|
||||
'allow_rebase_merge': False,
|
||||
}))
|
||||
r = r.json()
|
||||
# wait for repository visibility
|
||||
while True:
|
||||
time.sleep(1)
|
||||
if github.head(r['url']).ok:
|
||||
break
|
||||
|
||||
repo = Repo(github, fullname, repos)
|
||||
|
||||
# create webhook
|
||||
@ -415,6 +422,7 @@ def make_repo(capsys, request, config, tunnel, users):
|
||||
},
|
||||
'events': ['pull_request', 'issue_comment', 'status', 'pull_request_review']
|
||||
}))
|
||||
time.sleep(1)
|
||||
|
||||
check(github.put('{}/contents/{}'.format(repo_url, 'a'), json={
|
||||
'path': 'a',
|
||||
@ -422,8 +430,7 @@ def make_repo(capsys, request, config, tunnel, users):
|
||||
'content': base64.b64encode(b'whee').decode('ascii'),
|
||||
'branch': 'garbage_%s' % uuid.uuid4()
|
||||
}))
|
||||
# try to unwatch repo, doesn't actually work
|
||||
repo.unsubscribe()
|
||||
time.sleep(1)
|
||||
return repo
|
||||
|
||||
yield repomaker
|
||||
|
Loading…
Reference in New Issue
Block a user