Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Aug 26 2021, 11:17 AM
Details
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb96bb662e8> def test_buffer_operation_order(sample_data) -> None: storage = get_storage_with_buffer_config() # Wrap the inner storage in a mock to track all method calls. storage.storage = mocked_storage = Mock(wraps=storage.storage) # Simulate a loader: add contents, directories, revisions, releases, then # snapshots. storage.content_add(sample_data.contents) storage.skipped_content_add(sample_data.skipped_contents) storage.directory_add(sample_data.directories) storage.revision_add(sample_data.revisions) storage.release_add(sample_data.releases) storage.snapshot_add(sample_data.snapshots) # Check that nothing has been flushed yet assert mocked_storage.method_calls == [] # Flush all the things > storage.flush() .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_buffer.py:599: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/storage/proxies/buffer.py:156: in flush stats = add_fn(list(batch)) /usr/lib/python3.7/unittest/mock.py:960: in __call__ return _mock_self._mock_call(*args, **kwargs) /usr/lib/python3.7/unittest/mock.py:1035: in _mock_call return self._mock_wraps(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.in_memory.InMemoryStorage object at 0x7fb96bb66358> directories = [Directory(entries=(DirectoryEntry(name=b'oof', type='file', target=b'6\xfa\xdew\x19<\xb6\xd2\xbd\x82aa\xa0\x97\x9dd\x...bcy7\xa0\xd5\xfd\xdc<\xd51'), Directory(entries=(), id=b'K\x82]\xc6B\xcbn\xb9\xa0`\xe5K\xf8\xd6\x92\x88\xfb\xeeI\x04')] def directory_add(self, directories: List[Directory]) -> Dict[str, int]: to_add = {d.id: d for d in directories}.values() if not self._allow_overwrite: # Filter out directories that are already inserted. missing = self.directory_missing([dir_.id for dir_ in to_add]) directories = [dir_ for dir_ in directories if dir_.id in missing] self.journal_writer.directory_add(directories) for directory in directories: # Add directory entries to the 'directory_entry' table rows = [ DirectoryEntryRow(directory_id=directory.id, **entry.to_dict()) for entry in directory.entries ] > if self._directory_entries_insert_algo == "one-by-one": E AttributeError: 'InMemoryStorage' object has no attribute '_directory_entries_insert_algo' .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:451: AttributeError