sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f3a3bdab4e0>
def test_buffering_proxy_storage_snapshot_threshold_hit(sample_data) -> None:
snapshots = sample_data.snapshots
threshold = 2
assert len(snapshots) > threshold
storage = get_storage_with_buffer_config(
min_batch_size={"snapshot": threshold,} # configuration set
)
> s = storage.snapshot_add(snapshots)
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_buffer.py:439:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/storage/buffer.py:138: in object_add
return self.flush()
.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 0x7f3a3bdab1d0>
snapshots = [Snapshot(branches=ImmutableDict({b'master': SnapshotBranch(target=b'\x01\xa7\x11O6\xfd\xdd^\xf2Q\x1b,\xad\xda#zh\xad\...x\x8e'), Snapshot(branches=ImmutableDict({}), id=b'\x1a\x88\x93\xe6\xa8oDN\x8b\xe8\xe7\xbd\xa6\xcb4\xfb\x175\xa0\x0e')]
def snapshot_add(self, snapshots: List[Snapshot]) -> Dict:
> 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:668: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Apr 29 2021, 10:23 AM