示例#1
0
def test_str_route_mismatch_error():
    """Call ``str`` on a ``RouteMismatchError``."""
    node = Node(str(uuid.uuid4()))
    node.start()
    mesh = Mesh()
    mesh.add_node(node)
    err = RouteMismatchError(mesh, (node, ))
    str(err)
示例#2
0
def random_mesh():
    mesh = Mesh.load_from_file("test/perf/random-mesh.yaml", use_diag_node=True)
    try:
        mesh.start(wait=True)
        yield mesh
    finally:
        mesh.stop()
示例#3
0
def mesh(request):
    mesh = Mesh.load_from_file(request.param, use_diag_node=True)
    try:
        mesh.start(wait=True)
        yield mesh
    except TimedOutError:
        raise
    finally:
        print(f"{time.time()} - Stopping current mesh")
        print(mesh.nodes['controller'])
        mesh.stop()