Closed apallier closed 6 years ago
Here an example of code to reproduce the problem:
from pytest_testrail import plugin
from pytest_testrail.testrail_api import APIClient
if __name__ == '__main__':
client = APIClient('https://mydomain.testrail.net/',
'login@mydomain.com',
'fSiezfeRTdmtbmoTOLYt-l6ukZb76UpMdtrYn/OCJ')
for i in range(100):
client.send_post(plugin.ADD_RESULT_URL.format(156, 366),
{'status_id': 1, 'version': '1.0.0.0'},
cert_check=True)
When HTTP 429 status occurs there is no payload in the response so the line return r.json()
raises an exception (in file testrail_api.py)
Sometimes, TestRail API returns a HTTP 429 status (too many requests). In this case, an exception occurred and the publishing is stopped: