Example #1
0
def check_kedroviz_up(context):
    """Check that kedro-viz is up and responding to requests"""

    wait_for(_check_service_up,
             expected_result=None,
             print_error=False,
             context=context)
Example #2
0
def check_jupyter_nb_proc_on_port(context: behave.runner.Context, port: int):
    """
    Check that jupyter notebook service is running on specified port

    Args:
        context: Test context
        port: Port to check
    """
    url = "http://localhost:{:d}".format(int(port))
    wait_for(
        func=_check_service_up,
        expected_result=None,
        print_error=False,
        context=context,
        url=url,
        string="Jupyter Notebook",
        timeout_=15,
    )
Example #3
0
def check_jupyter_lab_proc_on_port(context: behave.runner.Context, port: int):
    """Check that jupyter lab service is running on specified port.

    Args:
        context: Test context
        port: Port to check

    """
    url = "http://localhost:%d" % int(port)
    try:
        util.wait_for(
            func=_check_service_up,
            context=context,
            url=url,
            string='<a href="/lab"',
            print_error=True,
        )
    finally:
        context.result.terminate()
Example #4
0
def check_jupyter_nb_proc_on_port(context: behave.runner.Context, port: int):
    """Check that jupyter notebook service is running on specified port.

    Args:
        context: Test context
        port: Port to check

    """
    url = f"http://localhost:{port}"
    try:
        util.wait_for(
            func=_check_service_up,
            context=context,
            url=url,
            string="Jupyter Notebook",
            timeout_=15,
            print_error=True,
        )
    finally:
        context.result.terminate()
def check_jupyter_nb_proc_on_port(
    context: behave.runner.Context, command: str, port: int
):
    """
    Check that jupyter notebook service is running on specified port

    Args:
        context: Test context
        command: Jupyter command message to check
        port: Port to check
    """
    url = f"http://localhost:{int(port)}"
    wait_for(
        func=_check_service_up,
        expected_result=None,
        print_error=False,
        context=context,
        url=url,
        string=f"Jupyter {command}",
        timeout_=15,
    )