Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_tenacious.TestTenaciousStorage::test_content_add_from_lazy_content
Failed

TEST RESULT

Run At
Aug 27 2021, 12:11 PM
Details
self = <swh.storage.tests.test_tenacious.TestTenaciousStorage object at 0x7fdc049a0b38> swh_storage = <swh.storage.proxies.tenacious.TenaciousProxyStorage object at 0x7fd9d782a128> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fd9d782acc0> def test_content_add_from_lazy_content(self, swh_storage, sample_data): cont = sample_data.content lazy_content = LazyContent.from_dict(cont.to_dict()) insertion_start_time = now() actual_result = swh_storage.content_add([lazy_content]) insertion_end_time = now() assert actual_result == { "content:add": 1, "content:add:bytes": cont.length, } # the fact that we retrieve the content object from the storage with # the correct 'data' field ensures it has been 'called' assert swh_storage.content_get_data(cont.sha1) == cont.data expected_cont = attr.evolve(lazy_content, data=None, ctime=None) contents = [ obj for (obj_type, obj) in swh_storage.journal_writer.journal.objects if obj_type == "content" ] assert len(contents) == 1 for obj in contents: assert insertion_start_time <= obj.ctime assert obj.ctime <= insertion_end_time assert attr.evolve(obj, ctime=None).to_dict() == expected_cont.to_dict() if not isinstance(swh_storage, (CassandraStorage, RemoteStorage)): swh_storage.refresh_stat_counters() > assert swh_storage.stat_counters()["content"] == 1 .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:229: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.in_memory.InMemoryStorage object at 0x7fd9d782a2e8> def stat_counters(self): > raise NotImplementedError() E NotImplementedError .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:1293: NotImplementedError