mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +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_merge_commit': False,
|
||||||
'allow_rebase_merge': 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)
|
repo = Repo(github, fullname, repos)
|
||||||
|
|
||||||
# create webhook
|
# create webhook
|
||||||
@ -415,6 +422,7 @@ def make_repo(capsys, request, config, tunnel, users):
|
|||||||
},
|
},
|
||||||
'events': ['pull_request', 'issue_comment', 'status', 'pull_request_review']
|
'events': ['pull_request', 'issue_comment', 'status', 'pull_request_review']
|
||||||
}))
|
}))
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
check(github.put('{}/contents/{}'.format(repo_url, 'a'), json={
|
check(github.put('{}/contents/{}'.format(repo_url, 'a'), json={
|
||||||
'path': 'a',
|
'path': 'a',
|
||||||
@ -422,8 +430,7 @@ def make_repo(capsys, request, config, tunnel, users):
|
|||||||
'content': base64.b64encode(b'whee').decode('ascii'),
|
'content': base64.b64encode(b'whee').decode('ascii'),
|
||||||
'branch': 'garbage_%s' % uuid.uuid4()
|
'branch': 'garbage_%s' % uuid.uuid4()
|
||||||
}))
|
}))
|
||||||
# try to unwatch repo, doesn't actually work
|
time.sleep(1)
|
||||||
repo.unsubscribe()
|
|
||||||
return repo
|
return repo
|
||||||
|
|
||||||
yield repomaker
|
yield repomaker
|
||||||
|
Loading…
Reference in New Issue
Block a user