Exemplo n.º 1
0
def additional_processes_can_be_started_and_restored_from_run_dir(start):
    original_process_set = start({
        "true1": ["true"],
    })
    original_process_set.start({
        "true2": ["true"]
    })
    process_set = processes.from_dir(original_process_set.run_dir)
    assert_equal("true1:\ntrue2:\n", process_set.all_output())
Exemplo n.º 2
0
def can_kill_all_processes_after_restoring_process_set_from_run_dir(start):
    original_process_set = start({
        "one": ["sh", "-c", "sleep 1"],
        "two": ["sh", "-c", "sleep 1"],
    })
    
    process_set = processes.from_dir(original_process_set.run_dir)
    
    assert process_set.all_running()
    process_set.kill_all()
    assert not process_set.any_running()