Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_retry::test_retrying_proxy_storage_content_add
Failed

TEST RESULT

Run At
Apr 29 2021, 10:23 AM
Details
self = <Retrying object at 0x7f385896eb00 (stop=<tenacity.stop.stop_after_attempt object at 0x7f3a3d7741d0>, wait=<tenacity.w...0x7f3a3d63e510>, before=<function before_nothing at 0x7f3a3d8c31e0>, after=<function after_nothing at 0x7f3a3d8cf510>)> fn = <function retry_function.<locals>.newf at 0x7f3842fd9d90> args = ([Content(sha1=b'4\x972t\xcc\xefj\xb4\xdf\xaa\xf8e\x99y/\xa9\xc3\xfeF\x89', sha1_git=b'\xd8\x1c\xc0q\x0e\xb6\xcf\x9e\x...99We'\xe4,\xfdv\xa9EZ$2\xfe\x7fVf\x95dW}\xd9<B\x80\xe7mf\x1d", length=3, status='visible', data=b'42\n', ctime=None)],) kwargs = {}, retry_state = <tenacity.RetryCallState object at 0x7f38673e2438> do = <tenacity.DoAttempt object at 0x7f3854e47208> def __call__(self, fn, *args, **kwargs): self.begin(fn) retry_state = RetryCallState(retry_object=self, fn=fn, args=args, kwargs=kwargs) while True: do = self.iter(retry_state=retry_state) if isinstance(do, DoAttempt): try: > result = fn(*args, **kwargs) .tox/py3/lib/python3.7/site-packages/tenacity/__init__.py:433: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = ([Content(sha1=b'4\x972t\xcc\xefj\xb4\xdf\xaa\xf8e\x99y/\xa9\xc3\xfeF\x89', sha1_git=b'\xd8\x1c\xc0q\x0e\xb6\xcf\x9e\x...99We'\xe4,\xfdv\xa9EZ$2\xfe\x7fVf\x95dW}\xd9<B\x80\xe7mf\x1d", length=3, status='visible', data=b'42\n', ctime=None)],) kwargs = {} @swh_retry def newf(*args, **kwargs): > return getattr(storage, attribute_name)(*args, **kwargs) .tox/py3/lib/python3.7/site-packages/swh/storage/retry.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.in_memory.InMemoryStorage object at 0x7f385896efd0> content = [Content(sha1=b'4\x972t\xcc\xefj\xb4\xdf\xaa\xf8e\x99y/\xa9\xc3\xfeF\x89', sha1_git=b'\xd8\x1c\xc0q\x0e\xb6\xcf\x9e\xf...x199We'\xe4,\xfdv\xa9EZ$2\xfe\x7fVf\x95dW}\xd9<B\x80\xe7mf\x1d", length=3, status='visible', data=b'42\n', ctime=None)] def content_add(self, content: List[Content]) -> Dict: to_add = { (c.sha1, c.sha1_git, c.sha256, c.blake2s256): c for c in content }.values() contents = [attr.evolve(c, ctime=now()) for c in to_add] > return self._content_add(list(contents), with_data=True) .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:237: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.in_memory.InMemoryStorage object at 0x7f385896efd0> contents = [Content(sha1=b'4\x972t\xcc\xefj\xb4\xdf\xaa\xf8e\x99y/\xa9\xc3\xfeF\x89', sha1_git=b'\xd8\x1c\xc0q\x0e\xb6\xcf\x9e\xf...status='visible', data=b'42\n', ctime=datetime.datetime(2021, 4, 29, 8, 22, 56, 956028, tzinfo=datetime.timezone.utc))] with_data = True def _content_add(self, contents: List[Content], with_data: bool) -> Dict: # Filter-out content already in the database. > if not self._allow_overwrite: E AttributeError: 'InMemoryStorage' object has no attribute '_allow_overwrite' .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:155: AttributeError The above exception was the direct cause of the following exception: swh_storage = <swh.storage.retry.RetryingProxyStorage object at 0x7f385896e3c8> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f385896e0f0> def test_retrying_proxy_storage_content_add(swh_storage, sample_data): """Standard content_add works as before """ sample_content = sample_data.content content = swh_storage.content_get_data(sample_content.sha1) assert content is None > s = swh_storage.content_add([sample_content]) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_retry.py:51: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/tenacity/__init__.py:339: in wrapped_f return self(f, *args, **kw) .tox/py3/lib/python3.7/site-packages/tenacity/__init__.py:430: in __call__ do = self.iter(retry_state=retry_state) .tox/py3/lib/python3.7/site-packages/tenacity/__init__.py:379: in iter six.raise_from(retry_exc, fut.exception()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ value = None from_value = AttributeError("'InMemoryStorage' object has no attribute '_allow_overwrite'") > ??? E tenacity.RetryError: RetryError[<Future at 0x7f3854e47ba8 state=finished raised AttributeError>] <string>:3: RetryError