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 22 2021, 8:33 PM
Details
self = <Retrying object at 0x7fb64d7d56a0 (stop=<tenacity.stop.stop_after_attempt object at 0x7fb7fae27358>, wait=<tenacity.w...0x7fb7fae468c8>, before=<function before_nothing at 0x7fb7faf48620>, after=<function after_nothing at 0x7fb7faf52950>)> fn = <function retry_function.<locals>.newf at 0x7fb6008d7950> 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, 22, 18, 32, 53, 525570, tzinfo=datetime.timezone.utc))],) kwargs = {}, retry_state = <tenacity.RetryCallState object at 0x7fb61245dc88> do = <tenacity.DoAttempt object at 0x7fb6032b9cc0> 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, 22, 18, 32, 53, 525570, 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 0x7fb62e9a0710> 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..., status='visible', data=None, ctime=datetime.datetime(2021, 4, 22, 18, 32, 53, 525570, 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:244: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.in_memory.InMemoryStorage object at 0x7fb62e9a0710> 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=None, ctime=datetime.datetime(2021, 4, 22, 18, 32, 53, 525570, 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 self._check_missing: E AttributeError: 'InMemoryStorage' object has no attribute '_check_missing' .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:152: AttributeError The above exception was the direct cause of the following exception: swh_storage = <swh.storage.retry.RetryingProxyStorage object at 0x7fb62e9a0208> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb61245db70> 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 '_check_missing'") > ??? E tenacity.RetryError: RetryError[<Future at 0x7fb6032b9e48 state=finished raised AttributeError>] <string>:3: RetryError