Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Sep 15 2021, 3:20 PM
Details
self = <swh.storage.tests.test_tenacious.TestTenaciousStorage object at 0x7f001b140198> swh_storage = <swh.storage.proxies.tenacious.TenaciousProxyStorage object at 0x7f0036c3d0b8> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f001341de48> def test_directory_ls_missing_content(self, swh_storage, sample_data): swh_storage.directory_add([sample_data.directory2]) > assert list(swh_storage.directory_ls(sample_data.directory2.id)) == [ { "dir_id": sample_data.directory2.id, "length": None, "name": b"oof", "perms": 33188, "sha1": None, "sha1_git": None, "sha256": None, "status": None, "target": sample_data.directory2.entries[0].target, "type": "file", }, ] .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:811: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:619: in directory_ls yield from self._directory_ls(directory, recursive) .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:558: in _directory_ls contents = self._content_find_many([{"sha1_git": row.target} for row in rows]) .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:368: in _content_find_many for row in rows: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.in_memory.InMemoryStorage object at 0x7f0036c3da90> algo = 'sha1_git' hashes = [b'6\xfa\xdew\x19<\xb6\xd2\xbd\x82aa\xa0\x97\x9dd\xc2\x8a\xb4\xfa'] def _content_get_from_hashes(self, algo, hashes: List[bytes]) -> Iterable: """From the name of a hash algorithm and a value of that hash, looks up the "hash -> token" secondary table (content_by_{algo}) to get tokens. Then, looks up the main table (content) to get all contents with that token, and filters out contents whose hash doesn't match.""" found_tokens = list( self._cql_runner.content_get_tokens_from_single_algo(algo, hashes) ) assert all(isinstance(token, int) for token in found_tokens) # Query the main table ('content'). > rows = self._cql_runner.content_get_from_tokens(found_tokens) E AttributeError: 'InMemoryCqlRunner' object has no attribute 'content_get_from_tokens' .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:172: AttributeError