def test_notifications_for_cancelled_jobs():

    print "Creating proxy ..."
    cream_testing.create_proxy("sarabINFN","dteam")

    print "Creating jdl"
    jdl_fname = cream_testing.sleep_jdl("dteam","300", "/tmp")

    print "Submitting job " + jdl_fname
    cream_job_id = cream_testing.submit_job(jdl_fname, "cream-06.pd.infn.it:8443/cream-pbs-cert" )
    print cream_job_id
    time.sleep(60)

    print "Verifying status of job " + cream_job_id
    cream_regression.job_status_should_be_in(cream_job_id, ['PENDING', 'RUNNING', 'REALLY-RUNNING'])

    print "Cancelling job " + cream_job_id
    cream_testing.cancel_job(cream_job_id)

    print "Sleeping 200sec"
    time.sleep(200)

    job_num = blah_testing.get_job_num_from_jid(cream_job_id)
    #job_num = "985342878"
    blah_parser_log_file_name = blah_testing.get_blah_parser_log_file_name()
    local_blah_parser_log_file = cream_regression.get_file_from_ce(blah_parser_log_file_name, "/tmp")
    #local_blah_parser_log_file = "/tmp/local_copy_of_a_cream_file"
    time.sleep(200)

    notifications_list = blah_testing.get_notifications_in_blah_parser_log(local_blah_parser_log_file, job_num)

    print notifications_list

    print blah_testing.check_notifications_for_cancelled(notifications_list)
Пример #2
0
def test_notifications_for_cancelled_jobs():

    print "Creating proxy ..."
    cream_testing.create_proxy("sarabINFN","dteam")

    print "Creating jdl"
    jdl_fname = cream_testing.sleep_jdl("dteam","300", "/tmp")

    print "Submitting job " + jdl_fname
    cream_job_id = cream_testing.submit_job(jdl_fname, "cream-06.pd.infn.it:8443/cream-pbs-cert" )
    print cream_job_id
    time.sleep(60)

    print "Verifying status of job " + cream_job_id
    cream_regression.job_status_should_be_in(cream_job_id, ['PENDING', 'RUNNING', 'REALLY-RUNNING'])

    print "Cancelling job " + cream_job_id
    cream_testing.cancel_job(cream_job_id)

    print "Sleeping 200sec"
    time.sleep(200)

    job_num = blah_testing.get_job_num_from_jid(cream_job_id)
    
    blah_parser_log_file_name = blah_testing.get_blah_parser_log_file_name()
    local_blah_parser_log_file = cream_regression.get_file_from_ce(blah_parser_log_file_name, "/tmp")
    
    time.sleep(200)

    notifications_list = blah_testing.get_notifications_in_blah_parser_log(local_blah_parser_log_file, job_num)

    print notifications_list

    print blah_testing.check_notifications_for_cancelled(notifications_list)
Пример #3
0
def cancel_list_of_jobs(job_ids_list):
    '''
      | Description: | Given a list of cream job ids, cancel them.                                  |
      | Arguments:   | The list of job ids to cancel.                                               |
      | Returns:     | Nothing.                                                                     |
      | Exceptions:  |                                                                              |
    '''

    if not job_ids_list:
        print "No jobs to cancel"
    else:
        for cream_job_id in job_ids_list:
            cream_testing.cancel_job(cream_job_id)
def cancel_list_of_jobs(job_ids_list):
    '''
      | Description: | Given a list of cream job ids, cancel them.                                  |
      | Arguments:   | The list of job ids to cancel.                                               |
      | Returns:     | Nothing.                                                                     |
      | Exceptions:  |                                                                              |
    '''

    if not job_ids_list:
        print "No jobs to cancel"
    else:
        for cream_job_id in job_ids_list:
            cream_testing.cancel_job(cream_job_id)
Пример #5
0
print "Creating jdl"
jdl_fname = cream_testing.sleep_jdl("dteam", "300", "/tmp")

print "Submitting job " + jdl_fname
cream_job_id = cream_testing.submit_job(
    jdl_fname, "cream-48.pd.infn.it:8443/cream-lsf-cert")
print cream_job_id
time.sleep(60)

print "Verifying status of job " + cream_job_id
cream_regression.job_status_should_be_in(
    cream_job_id, ['PENDING', 'RUNNING', 'REALLY-RUNNING'])

print "Cancelling job " + cream_job_id
cream_testing.cancel_job(cream_job_id)

print "Sleeping 200sec"
time.sleep(200)

job_num = blah_testing.get_job_num_from_jid(cream_job_id)
#job_num = "985342878"
blah_parser_log_file_name = blah_testing.get_blah_parser_log_file_name()
local_blah_parser_log_file = cream_regression.get_file_from_ce(
    blah_parser_log_file_name, "/tmp")
#local_blah_parser_log_file = "/tmp/local_copy_of_a_cream_file"
time.sleep(200)

notifications_list = blah_testing.get_notifications_in_blah_parser_log(
    local_blah_parser_log_file, job_num)
print "Creating proxy ..."
cream_testing.create_proxy("sarabINFN","dteam")

print "Creating jdl"
jdl_fname = cream_testing.sleep_jdl("dteam","300", "/tmp")

print "Submitting job " + jdl_fname
cream_job_id = cream_testing.submit_job(jdl_fname, "cream-48.pd.infn.it:8443/cream-lsf-cert" )
print cream_job_id
time.sleep(60)

print "Verifying status of job " + cream_job_id
cream_regression.job_status_should_be_in(cream_job_id, ['PENDING', 'RUNNING', 'REALLY-RUNNING'])

print "Cancelling job " + cream_job_id
cream_testing.cancel_job(cream_job_id)

print "Sleeping 200sec"
time.sleep(200)

job_num = blah_testing.get_job_num_from_jid(cream_job_id)
#job_num = "985342878"
blah_parser_log_file_name = blah_testing.get_blah_parser_log_file_name()
local_blah_parser_log_file = cream_regression.get_file_from_ce(blah_parser_log_file_name, "/tmp")
#local_blah_parser_log_file = "/tmp/local_copy_of_a_cream_file"
time.sleep(200)

notifications_list = blah_testing.get_notifications_in_blah_parser_log(local_blah_parser_log_file, job_num)

print notifications_list