Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Apr 29 2021, 10:23 AM
Details
self = <Retrying object at 0x7f384d9934e0 (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 0x7f3842ffcb70> 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... status='visible', data=None, ctime=datetime.datetime(2021, 4, 29, 8, 22, 57, 937055, tzinfo=datetime.timezone.utc))],) kwargs = {}, retry_state = <tenacity.RetryCallState object at 0x7f393c2d9b00> do = <tenacity.DoAttempt object at 0x7f3854ead8d0> 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... status='visible', data=None, ctime=datetime.datetime(2021, 4, 29, 8, 22, 57, 937055, tzinfo=datetime.timezone.utc))],) 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 0x7f38649de3c8> 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...3, status='visible', data=None, ctime=datetime.datetime(2021, 4, 29, 8, 22, 57, 937055, tzinfo=datetime.timezone.utc))] def content_add_metadata(self, content: List[Content]) -> Dict: > return self._content_add(content, with_data=False) .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:247: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.in_memory.InMemoryStorage object at 0x7f38649de3c8> 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...3, status='visible', data=None, ctime=datetime.datetime(2021, 4, 29, 8, 22, 57, 937055, tzinfo=datetime.timezone.utc))] with_data = False 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 0x7f38649ded30> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f388cd5f4a8> def test_retrying_proxy_storage_content_add_metadata(swh_storage, sample_data): """Standard content_add_metadata works as before """ sample_content = sample_data.content content = attr.evolve(sample_content, data=None) pk = content.sha1 content_metadata = swh_storage.content_get([pk]) assert content_metadata == [None] > s = swh_storage.content_add_metadata([attr.evolve(content, ctime=now())]) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_retry.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .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 0x7f3854ead2b0 state=finished raised AttributeError>] <string>:3: RetryError