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:28 AM
Details
self = <Retrying object at 0x7f4539877668 (stop=<tenacity.stop.stop_after_attempt object at 0x7f4722e765c0>, wait=<tenacity.w...0x7f4722d7f510>, before=<function before_nothing at 0x7f47230081e0>, after=<function after_nothing at 0x7f4723015510>)> fn = <function retry_function.<locals>.newf at 0x7f45224d6158> 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 0x7f4546a2fa90> do = <tenacity.DoAttempt object at 0x7f452a1890f0> 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 0x7f4539877a58> 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 0x7f4539877a58> 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, 28, 11, 598965, 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 0x7f4539877080> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f45398775c0> 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 0x7f452a189d30 state=finished raised AttributeError>] <string>:3: RetryError