Page MenuHomeSoftware Heritage
Paste P591

tenacity retryerror
ActivePublic

Authored by vlorentz on Feb 5 2020, 6:40 PM.
swh/storage/tests/test_retry.py F
================================================================================================================================== FAILURES ===================================================================================================================================
___________________________________________________________________________________________________________________ test_retrying_proxy_storage_content_add ___________________________________________________________________________________________________________________
swh_storage = <swh.storage.retry.RetryingProxyStorage object at 0x7fb6404f15f8>
sample_data = {'content': [{'blake2s256': b"\xd5\xfe\x199We'\xe4,\xfdv\xa9EZ$2\xfe\x7fVf\x95dW}\xd9<B\x80\xe7mf\x1d", 'data': b'42\n...13B2S1\x000\xf51\xe62\xa73\xff7\xc3\xa90'}], 'origin': [{'url': 'file:///dev/null'}, {'url': 'file:///dev/zero'}], ...}
def test_retrying_proxy_storage_content_add(swh_storage, sample_data):
"""Standard content_add works as before
"""
sample_content = sample_data['content'][0]
content = next(swh_storage.content_get([sample_content['sha1']]))
assert not content
> s = swh_storage.content_add([sample_content])
swh/storage/tests/test_retry.py:31:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../.local/lib/python3.7/site-packages/tenacity/__init__.py:311: in wrapped_f
return self.call(f, *args, **kw)
../../.local/lib/python3.7/site-packages/tenacity/__init__.py:391: in call
do = self.iter(retry_state=retry_state)
../../.local/lib/python3.7/site-packages/tenacity/__init__.py:351: in iter
six.raise_from(retry_exc, fut.exception())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
value = None, from_value = None
> ???
E tenacity.RetryError: RetryError[<Future at 0x7fb64176e8d0 state=finished returned dict>]
<string>:3: RetryError
------------------------------------------------------------------------------------------------------------------------------ Captured log call ------------------------------------------------------------------------------------------------------------------------------
WARNING swh.storage.retry:retry.py:34 Retry adding a batch
WARNING swh.storage.retry:retry.py:34 Retry adding a batch
WARNING swh.storage.retry:retry.py:34 Retry adding a batch