Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Apr 29 2021, 11:01 AM
Details
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f524f56beb8> def test_buffering_proxy_storage_extid_deduplicate(sample_data) -> None: extids = sample_data.extids[:2] storage = get_storage_with_buffer_config(min_batch_size={"extid": 2,}) s = storage.extid_add([extids[0], extids[0]]) assert s == {} s = storage.extid_add([extids[0]]) assert s == {} > s = storage.extid_add([extids[1]]) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_buffer.py:213: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .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 0x7f524f56bbe0> ids = [ExtID(extid_type='git', extid=b'\x01\xa7\x11O6\xfd\xdd^\xf2Q\x1b,\xad\xda#zh\xad\xbb\x12', target=CoreSWHID(namespace...8Lh', object_type=<ObjectType.REVISION: 'rev'>), id=b'M\x016\x88\xa6\xf4\xaa\xb5\x9f:\xb0\xe1\x99t$\xc1\xf8\xc6d\x06')] def extid_add(self, ids: List[ExtID]) -> Dict[str, int]: if not self._allow_overwrite: extids = [ extid for extid in ids if not self._cql_runner.extid_get_from_pk( extid_type=extid.extid_type, extid=extid.extid, target=extid.target, ) ] > self.journal_writer.extid_add(extids) E UnboundLocalError: local variable 'extids' referenced before assignment .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:1398: UnboundLocalError