Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.objstorage.replayer.tests.test_cli::test_replay_content_check_dst_retry
Failed

TEST RESULT

Run At
Dec 9 2021, 4:58 PM
Details
objstorages = {'dst': <swh.objstorage.replayer.tests.test_cli.FlakyObjStorage object at 0x7f909bff12e8>, 'src': <swh.objstorage.backends.in_memory.InMemoryObjStorage object at 0x7f90a4a185f8>} kafka_prefix = 'gbqvlmlsts', kafka_consumer_group = 'test-consumer-gbqvlmlsts' kafka_server = '127.0.0.1:50245', monkeypatch_retry_sleep = None caplog = <_pytest.logging.LogCaptureFixture object at 0x7f90a43bcf98> redis_proc = <pytest_redis.executor.RedisExecutor: "/usr/bin/r..." 0x7f909bf8a048> redisdb = Redis<ConnectionPool<UnixDomainSocketConnection<path=/tmp/pytest-of-jenkins/pytest-0/pytest-redis-redis_proc0/redis.12951.sock,db=0>>> @_patch_objstorages(["src", "dst"]) def test_replay_content_check_dst_retry( objstorages, kafka_prefix: str, kafka_consumer_group: str, kafka_server: Tuple[Popen, int], monkeypatch_retry_sleep, caplog, redis_proc, redisdb, ): """Check the content replayer with a flaky dst objstorage for 'in' operations. """ contents = _fill_objstorage_and_kafka( kafka_server, kafka_prefix, objstorages["src"] ) # build a flaky dst objstorage in which the 'in' operation for the first # NUM_CONTENT_DST objects will fail once failures = {} for i, (sha1, content) in enumerate(contents.items()): if i >= NUM_CONTENTS_DST: break objstorages["dst"].add(content, obj_id=sha1) failures["in", sha1] = 1 orig_dst = objstorages["dst"] objstorages["dst"] = FlakyObjStorage(state=orig_dst.state, failures=failures) caplog.set_level(logging.DEBUG, "swh.objstorage.replayer.replay") result = invoke( "replay", "--check-dst", "--stop-after-objects", str(NUM_CONTENTS), journal_config={ "brokers": kafka_server, "group_id": kafka_consumer_group, "prefix": kafka_prefix, "error_reporter": {"host": redis_proc.host, "port": redis_proc.port}, }, ) expected = r"Done.\n" > assert result.exit_code == 0, result.output E AssertionError: E assert 1 == 0 E +1 E -0 .tox/py3/lib/python3.7/site-packages/swh/objstorage/replayer/tests/test_cli.py:457: AssertionError