Skip to content
Snippets Groups Projects
Commit cdadcb16 authored by jette's avatar jette
Browse files

Modify srun test for change in step queuing logic

parent 8570d1b2
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,7 @@ make_bash_script $file_in " ...@@ -69,7 +69,7 @@ make_bash_script $file_in "
inx=\$((inx+1)) inx=\$((inx+1))
done done
$bin_sleep 2 $bin_sleep 2
$srun -v --exclusive -n1 $bin_printenv $node_name_env & $srun -v --exclusive -n1 $scontrol show steps &
wait wait
" "
...@@ -112,16 +112,11 @@ if {[wait_for_file $file_out] != 0} { ...@@ -112,16 +112,11 @@ if {[wait_for_file $file_out] != 0} {
send_user "\nFAILURE: Output file $file_out is missing\n" send_user "\nFAILURE: Output file $file_out is missing\n"
exit 1 exit 1
} }
set match1 0 set matches 0
set match2 0
spawn $bin_cat $file_out spawn $bin_cat $file_out
expect { expect {
-re "Job step creation temporarily disabled, retrying" { -re "StepId=$job_id" {
incr match1 incr matches
exp_continue
}
-re "Job step created" {
incr match2
exp_continue exp_continue
} }
eof { eof {
...@@ -129,9 +124,9 @@ expect { ...@@ -129,9 +124,9 @@ expect {
} }
} }
if { $match1 != 1 || $match2 != 1 } { if { $matches != 1 } {
send_user "\nFAILURE: Problem with exclusive resource allocation " send_user "\nFAILURE: Problem with exclusive resource allocation "
send_user "for step ($match1, $match2)\n" send_user "for step ($matches)\n"
set exit_code 1 set exit_code 1
} }
...@@ -156,7 +151,7 @@ make_bash_script $file_in " ...@@ -156,7 +151,7 @@ make_bash_script $file_in "
inx=\$((inx+1)) inx=\$((inx+1))
done done
$bin_sleep 2 $bin_sleep 2
$srun --exclusive -n1 --immediate hostname & $srun -v --exclusive -n1 --immediate $scontrol show steps &
wait wait
" "
...@@ -199,17 +194,17 @@ if {[wait_for_file $file_out] != 0} { ...@@ -199,17 +194,17 @@ if {[wait_for_file $file_out] != 0} {
send_user "\nFAILURE: Output file $file_out is missing\n" send_user "\nFAILURE: Output file $file_out is missing\n"
exit 1 exit 1
} }
set match1 0 set matches 0
spawn $bin_cat $file_out spawn $bin_cat $file_out
expect { expect {
-re "Job step creation temporarily disabled, retrying" { -re "StepId=$job_id" {
send_user "\nFAILURE: Problem --exclusive and --immediate option for step\n" send_user "\nFAILURE: Problem --exclusive and --immediate option for step\n"
set exit_code 1 set exit_code 1
exp_continue exp_continue
} }
-re "Unable to create job step" { -re "Unable to create job step" {
send_user "This error was expected, no worries\n" send_user "This error was expected, no worries\n"
incr match1 incr matches
exp_continue exp_continue
} }
eof { eof {
...@@ -217,8 +212,8 @@ expect { ...@@ -217,8 +212,8 @@ expect {
} }
} }
if { $match1 != 1 } { if { $matches != 1 } {
send_user "\nFAILURE: Problem --exclusive and --immediate option for step\n" send_user "\nFAILURE: Problem --exclusive and --immediate option for step ($matches)\n"
set exit_code 1 set exit_code 1
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment