Esempio n. 1
0
def test_flaky(flaky_node):
    """
    In these tests, we make the network of the nodes as flaky using blockade.
    There are 4 tests :
    1) one of the datanodes selected randomly and network of the datanode is
    made flaky.
    2) scm network is made flaky.
    3) om network is made flaky.
    4) Network of all the nodes are made flaky.

    """
    flaky_container_name = {
        "scm": cluster.scm,
        "om": cluster.om,
        "datanode": random.choice(cluster.datanodes),
        "all": "--all"
    }[flaky_node]

    Blockade.make_flaky(flaky_container_name)
    Blockade.blockade_status()
    exit_code, output = cluster.run_freon(1, 1, 1, 10240)
    assert exit_code == 0, "freon run failed with output=[%s]" % output
def test_flaky(flaky_nodes):
    Blockade.make_flaky(flaky_nodes, CONTAINER_LIST)
    Blockade.blockade_status()
    exit_code, output = ClusterUtils.run_freon(FILE, 1, 1, 1, 10240, "RATIS",
                                               "THREE")
    assert exit_code == 0, "freon run failed with output=[%s]" % output