Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Jan 6 2022, 5:39 PM
Details
self = <swh.storage.tests.test_tenacious.TestTenaciousStorage object at 0x7fefa50f36d8> swh_storage = <swh.storage.proxies.tenacious.TenaciousProxyStorage object at 0x7fefa50f3e80> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fefa50f3470> @pytest.mark.property_based > @settings(suppress_health_check=function_scoped_fixture_check,) @given( strategies.sets( elements=strategies.sampled_from(["sha256", "sha1_git", "blake2s256"]), min_size=0, ) ) def test_content_missing_unknown_algo(self, swh_storage, sample_data, algos): .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:497: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:519: in test_content_missing_unknown_algo assert set(swh_storage.content_missing(test_contents)) == set( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.in_memory.InMemoryStorage object at 0x7fefa50f3320> contents = [{'blake2s256': b'\x84\x9c \xfa\xd12\xb7\xc2\xd6,\x15\xde1\n\xdf\xe8{\xe9J7\x99A\xbe\xd2\x95\xe8\x14\x1cb\x19\x81\r', ...\x9a\x13{\x8d\xc5\x83K\x9b', 'length': 209715200, 'nonexisting_algo': b'\x00', 'origin': 'file:///dev/zero', ...}, ...] key_hash = 'sha1' @timed def content_missing( self, contents: List[Dict[str, Any]], key_hash: str = "sha1" ) -> Iterable[bytes]: if key_hash not in DEFAULT_ALGORITHMS: raise StorageArgumentException( "key_hash should be one of {','.join(DEFAULT_ALGORITHMS)}" ) contents_with_all_hashes = [] contents_with_missing_hashes = [] for content in contents: if DEFAULT_ALGORITHMS <= set(content): contents_with_all_hashes.append(content) else: contents_with_missing_hashes.append(content) # These contents can be queried efficiently directly in the main table > for content in self._cql_runner.content_missing_from_all_hashes( contents_with_all_hashes ): E AttributeError: 'InMemoryCqlRunner' object has no attribute 'content_missing_from_all_hashes' .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:406: AttributeError