Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Jul 31 2020, 2:19 PM
Details
kafka_prefix = 'yzuurtzybo', kafka_server = '127.0.0.1:57397' consumer = <cimpl.Consumer object at 0x7fb96485eb70> def test_storage_direct_writer_anonymized( kafka_prefix: str, kafka_server, consumer: Consumer ): writer_config = { "cls": "kafka", "brokers": [kafka_server], "client_id": "kafka_writer", "prefix": kafka_prefix, "anonymize": True, } storage_config: Dict[str, Any] = { "cls": "pipeline", "steps": [{"cls": "memory", "journal_writer": writer_config},], } storage = get_storage(**storage_config) expected_messages = 0 for obj_type, objs in TEST_OBJECTS.items(): if obj_type == "origin_visit": # these have non-consistent API and are unrelated with what we # want to test here continue method = getattr(storage, obj_type + "_add") method(objs) expected_messages += len(objs) existing_topics = set( topic for topic in consumer.list_topics(timeout=10).topics.keys() if topic.startswith(kafka_prefix) ) > assert existing_topics == { f"{kafka_prefix}.{obj_type}" for obj_type in ( "content", "directory", "origin", "origin_visit", "origin_visit_status", "release", "revision", "snapshot", "skipped_content", ) } | { f"{kafka_prefix}_privileged.{obj_type}" for obj_type in ("release", "revision",) } E AssertionError: assert {'yzuurtzybo....n_visit', ...} == {'yzuurtzybo....release', ...} E Extra items in the left set: E 'yzuurtzybo.metadata_authority' E 'yzuurtzybo.raw_extrinsic_metadata' E 'yzuurtzybo.metadata_fetcher' E Full diff: E { E 'yzuurtzybo.content',... E E ...Full output truncated (15 lines hidden), use '-vv' to show .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_kafka_writer.py:121: AssertionError