sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f3a3c79e9b0>
def test_buffering_proxy_storage_revision_threshold_not_hit(sample_data) -> None:
revision = sample_data.revision
storage = get_storage_with_buffer_config(min_batch_size={"revision": 10,})
s = storage.revision_add([revision])
assert s == {}
missing_revisions = storage.revision_missing([revision.id])
assert list(missing_revisions) == [revision.id]
> s = storage.flush()
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_buffer.py:292:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/storage/buffer.py:156: in flush
stats = add_fn(list(batch))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.in_memory.InMemoryStorage object at 0x7f3a3c79ee10>
revisions = [Revision(message=b'hello', author=Person(fullname=b'Nicolas Dandrimont <nicolas@example.com> ', name=b'Nicolas Dandri...bb\x12', extra_headers=((b'gpgsig', b'test123'), (b'mergetag', b'foo\\bar'), (b'mergetag', b'"\xaf\x89\x80\x01\x00')))]
def revision_add(self, revisions: List[Revision]) -> Dict:
# Filter-out revisions 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:526: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Apr 29 2021, 10:23 AM