replayer_storage_and_client = (<swh.storage.in_memory.InMemoryStorage object at 0x7fb65fdf2438>, <swh.journal.client.JournalClient object at 0x7fb601a60a20>)
def test_replay_skipped_content(replayer_storage_and_client):
"""Test the 'skipped_content' topic is properly replayed."""
src, replayer = replayer_storage_and_client
> _check_replay_skipped_content(src, replayer, "skipped_content")
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_replay.py:207:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_replay.py:288: in _check_replay_skipped_content
nb_inserted = replayer.process(worker_fn)
.tox/py3/lib/python3.7/site-packages/swh/journal/client.py:265: in process
batch_processed, at_eof = self.handle_messages(messages, worker_fn)
.tox/py3/lib/python3.7/site-packages/swh/journal/client.py:292: in handle_messages
worker_fn(dict(objects))
.tox/py3/lib/python3.7/site-packages/swh/storage/replay.py:62: in process_replay_objects
_insert_objects(object_type, objects, storage)
.tox/py3/lib/python3.7/site-packages/swh/storage/replay.py:136: in _insert_objects
collision_aware_content_add(storage.skipped_content_add, skipped_contents)
.tox/py3/lib/python3.7/site-packages/swh/storage/replay.py:86: in collision_aware_content_add
content_add_fn(contents)
.tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:386: in skipped_content_add
return self._skipped_content_add(contents)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.in_memory.InMemoryStorage object at 0x7fb62e0d9ac8>
contents = [SkippedContent(sha1=b"\xaa\xad\xd9Iw\xb8\xfb\xf3\xf6\xfb\t\xfc;\xbb\xc9\xed\xbd\xfa\x84'", sha1_git=b'\x05\xa5\x14s\x...n='https://somewhere/24', ctime=datetime.datetime(2021, 4, 22, 18, 32, 45, 725661, tzinfo=datetime.timezone.utc)), ...]
def _skipped_content_add(self, contents: List[SkippedContent]) -> Dict:
# Filter-out content already in the database.
> if self._check_missing:
E AttributeError: 'InMemoryStorage' object has no attribute '_check_missing'
.tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:360: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Apr 22 2021, 8:33 PM