def METHOD_NAME():
    "Wait for MSDP to converge"
    tgen = get_topogen()
    if tgen.routers_have_failure():
        pytest.skip(tgen.errors)
    logger.info("test MSDP convergence")
    def expect_msdp_peer(router, peer, sa_count=0):
        "Expect MSDP peer connection to be established with SA amount."
        logger.info(
            "waiting MSDP connection from peer {} on router {}".format(peer, router)
        )
        test_func = partial(
            topotest.router_json_cmp,
            tgen.gears[router],
            "show ip msdp peer json",
            {peer: {"state": "established", "saCount": sa_count}},
        )
        _, result = topotest.run_and_expect(test_func, None, count=40, wait=2)
        assertmsg = '"{}" MSDP connection failure'.format(router)
        assert result is None, assertmsg
    mcastaddr = "229.0.1.10"
    logger.info("Starting helper1")
    app_helper.run("h1", ["--send=0.7", mcastaddr, "h1-eth0"])
    logger.info("Starting helper2")
    app_helper.run("h2", [mcastaddr, "h2-eth0"])
    # R1 peers.
    expect_msdp_peer("r1", "10.254.254.2")
    expect_msdp_peer("r1", "10.254.254.3")
    # R2 peers.
    expect_msdp_peer("r2", "10.254.254.1", 1)
    expect_msdp_peer("r2", "10.254.254.3")
    # R3 peers.
    expect_msdp_peer("r3", "10.254.254.1", 1)
    expect_msdp_peer("r3", "10.254.254.2")