def setup_class(cls): logging.basicConfig(filename='tests.log', level=logging.INFO, format='%(levelname)s %(asctime)s %(module)s:%(message)s') pipeline_name = "kill_node_manually_test" cls.pipeline_id = PipelineManager.create(pipeline_name) logging.info("Pipeline {} with ID {} created.".format(pipeline_name, cls.pipeline_id)) try: cls.run_id = run_pipe(pipeline_name, "-id", "14")[0] logging.info("Pipeline run with ID {}.".format(cls.run_id)) wait_for_required_status("RUNNING", cls.run_id, MAX_REP_COUNT) stop_pipe(cls.run_id) wait_for_required_status("STOPPED", cls.run_id, MAX_REP_COUNT) sleep(60) logging.info("Pipeline {} stopped.".format(cls.run_id)) cls.node_name = get_node_name(cls.run_id) logging.info("Used node {}.".format(cls.node_name)) terminate_node(cls.node_name) wait_for_node_termination(cls.node_name, MAX_REP_COUNT) logging.info("Node {} terminated.".format(cls.node_name)) except BaseException as e: cls.teardown_class() raise RuntimeError(e.message)
def setup_class(cls): logging.basicConfig( filename='tests.log', level=logging.INFO, format='%(levelname)s %(asctime)s %(module)s:%(message)s') pipeline_name = "start_stop_pipe_test" cls.pipeline_id = PipelineManager.create(pipeline_name) logging.info("Pipeline {} with ID {} created.".format( pipeline_name, cls.pipeline_id)) try: run_id = run_pipe(pipeline_name, "-id", "17")[0] logging.info("Pipeline run with ID {}.".format(run_id)) wait_for_required_status("SCHEDULED", run_id, MAX_REP_COUNT) wait_for_instance_creation(run_id, MAX_REP_COUNT) logging.info("Instance {} created.".format(run_id)) stop_pipe(run_id) wait_for_required_status("STOPPED", run_id, MAX_REP_COUNT) sleep(60) logging.info("Pipeline {} stopped.".format(run_id)) node_state = wait_for_node_up(run_id, MAX_REP_COUNT) cls.node_name = get_node_name_from_cluster_state(node_state) logging.info("Used node {}.".format(cls.node_name)) cls.latest_run_id = run_id except BaseException as e: cls.teardown_class() raise RuntimeError(e.message)
def setup_class(cls): logging.basicConfig( filename='tests.log', level=logging.INFO, format='%(levelname)s %(asctime)s %(module)s:%(message)s') pipeline_name = "stop_pipe_before_labeling_test" cls.pipeline_name = pipeline_name cls.pipeline_id = PipelineManager.create(pipeline_name) logging.info("Pipeline {} with ID {} created.".format( pipeline_name, cls.pipeline_id)) try: run_id = run_pipe(pipeline_name, "-id", "21")[0] cls.run_id = run_id logging.info("Pipeline run with ID {}.".format(cls.run_id)) wait_for_required_status("SCHEDULED", run_id, MAX_REP_COUNT) instance = wait_for_instance_creation(run_id, MAX_REP_COUNT) private_ip = get_private_ip(instance) logging.info("Started to find node {}.".format(private_ip)) node_state = wait_for_node_up_without_id(MAX_REP_COUNT, private_ip) cls.node_name = get_node_name_from_cluster_state(node_state) logging.info("Node {} in use.".format(private_ip)) stop_pipe(run_id) sleep(60) wait_for_required_status("STOPPED", run_id, MAX_REP_COUNT) logging.info("Pipeline {} stopped.".format(run_id)) except BaseException as e: cls.teardown_class() raise RuntimeError(e.message)
def setup_class(cls): logging.basicConfig( filename='tests.log', level=logging.INFO, format='%(levelname)s %(asctime)s %(module)s:%(message)s') pipeline_name = "two_pipes_simultaneously_test" cls.pipeline_id = PipelineManager.create(pipeline_name) logging.info("Pipeline {} with ID {} created.".format( pipeline_name, cls.pipeline_id)) try: first_run_id = run_pipe(pipeline_name, "-id", "19")[0] cls.first_run_id = first_run_id logging.info("Pipeline run with ID {}.".format(first_run_id)) second_run_id = run_pipe(pipeline_name, "-id", "19")[0] cls.second_run_id = second_run_id logging.info("Pipeline run with ID {}.".format(second_run_id)) wait_for_required_status("RUNNING", first_run_id, MAX_REP_COUNT) wait_for_required_status("RUNNING", second_run_id, MAX_REP_COUNT) cls.first_node_name = get_node_name(first_run_id) logging.info("Node {} in use.".format(cls.first_node_name)) cls.second_node_name = get_node_name(second_run_id) logging.info("Node {} in use.".format(cls.second_node_name)) except BaseException as e: cls.teardown_class() raise RuntimeError(e.message)
def setup_class(cls): logging.basicConfig( filename='tests.log', level=logging.INFO, format='%(levelname)s %(asctime)s %(module)s:%(message)s') cls.pipeline_id = PipelineManager.create(cls.pipeline_name) logging.info("Pipeline %s with ID %s created." % (cls.pipeline_name, cls.pipeline_id))
def setup_class(cls): logging.basicConfig( filename='tests.log', level=logging.INFO, format='%(levelname)s %(asctime)s %(module)s:%(message)s') pipeline_name = "instance_kill_by_timeout_test" cls.pipeline_id = PipelineManager.create(pipeline_name) logging.info("Pipeline {} with ID {} created.".format( pipeline_name, cls.pipeline_id)) try: cls.run_id = run_pipe(pipeline_name, "-id", "13")[0] logging.info("Pipeline run with ID {}.".format(cls.run_id)) except BaseException as e: cls.teardown_class() raise RuntimeError(e.message)
def setup_class(cls): logging.basicConfig( filename='tests.log', level=logging.INFO, format='%(levelname)s %(asctime)s %(module)s:%(message)s') pipeline_name = "node_reassign_test" cls.pipeline_id = PipelineManager.create(pipeline_name) logging.info("Pipeline {} with ID {} created.".format( pipeline_name, cls.pipeline_id)) try: run_id = run_pipe(pipeline_name, "-id", "16")[0] cls.first_run_id = run_id logging.info("Pipeline run with ID {}.".format(cls.first_run_id)) wait_for_node_up(run_id, MAX_REP_COUNT) node_name = get_node_name(run_id) logging.info( "Node {} appeared in cluster state.".format(node_name)) cls.first_node_name = node_name wait_for_run_node_job(node_name, MAX_REP_COUNT) logging.info("Job name: {}".format(node_job_running(node_name))) stop_pipe(run_id) sleep(60) wait_for_required_status("STOPPED", run_id, MAX_REP_COUNT) logging.info("Pipeline {} stopped.".format(cls.first_run_id)) wait_for_end_of_job(node_name, MAX_REP_COUNT) run_id = run_pipe(pipeline_name, "-id", "16")[0] cls.second_run_id = run_id logging.info("Pipeline {} launched".format(run_id)) node_state = wait_for_node_up(run_id, MAX_REP_COUNT) node_name = get_node_name_from_cluster_state(node_state) logging.info("Node {} in use.".format(node_name)) cls.second_node_name = node_name except BaseException as e: cls.teardown_class() raise RuntimeError(e.message)
def setup_class(cls): logging.basicConfig( filename='tests.log', level=logging.INFO, format='%(levelname)s %(asctime)s %(module)s:%(message)s') pipeline_name = "test_terminate_instance_before_registration" cls.pipeline_id = PipelineManager.create(pipeline_name) logging.info("Pipeline {} with ID {} created.".format( pipeline_name, cls.pipeline_id)) try: run_id = run_pipe(pipeline_name, "-id", "11")[0] cls.run_id = run_id logging.info("Pipeline run with ID {}.".format(cls.run_id)) wait_for_required_status("SCHEDULED", run_id, MAX_REP_COUNT) wait_for_instance_creation(run_id, MAX_REP_COUNT) logging.info("Instance {} created.".format(run_id)) terminate_instance(run_id) wait_for_instance_termination(run_id, MAX_REP_COUNT) logging.info("Instance {} terminated.".format(run_id)) except BaseException as e: cls.teardown_class() raise RuntimeError(e.message)
def setup_class(cls): logging.basicConfig( filename='tests.log', level=logging.INFO, format='%(levelname)s %(asctime)s %(module)s:%(message)s') pipeline_name = "terminate_instance_during_pipe_work_test" cls.pipeline_id = PipelineManager.create(pipeline_name) logging.info("Pipeline {} with ID {} created.".format( pipeline_name, cls.pipeline_id)) try: run_id = run_pipe(pipeline_name)[0] cls.run_id = run_id logging.info("Pipeline run with ID {}.".format(run_id)) node_state = wait_for_node_up(run_id, MAX_REP_COUNT) cls.node_name = get_node_name_from_cluster_state(node_state) logging.info("Used node {}.".format(cls.node_name)) terminate_instance(run_id) wait_for_instance_termination(run_id, MAX_REP_COUNT) logging.info("Instance {} was terminated.".format(run_id)) except BaseException as e: cls.teardown_class() raise RuntimeError(e.message)