Skip to content

Commit 1eb4b81

Browse files
committed
Testsuite - Improve test38.9 avoiding false failures
Sometimes squeue may print the components of a het job in a different order, so we should not relay on that order. Ticket: 14554
1 parent 7de49a9 commit 1eb4b81

1 file changed

Lines changed: 7 additions & 17 deletions

File tree

testsuite/expect/test38.9

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,25 +67,15 @@ if {$het_job_id == 0} {
6767

6868
log_debug "Collect Nodenames"
6969

70-
send "$squeue -j $het_job_id -o\"NAME=%N\" --noheader \r"
71-
expect {
72-
-re "--noheader" {
73-
exp_continue
74-
}
75-
-re "NAME=($re_word_str)" {
76-
set component($index) $expect_out(1,string)
77-
incr index
78-
exp_continue
79-
}
80-
-re "$test_prompt" {
81-
#break
82-
}
83-
timeout {
84-
fail "squeue not responding"
70+
dict for {k v} [get_jobs] {
71+
if {[dict get $v "HetJobId"] eq $het_job_id} {
72+
set het_offset [dict get $v "HetJobOffset"]
73+
set component($het_offset) [dict get $v "NodeList"]
8574
}
8675
}
87-
if {$index != 3} {
88-
fail "squeue failure ($index != 3)"
76+
77+
if {[array size component] != 3} {
78+
fail "Unable to obtain the nodes of each component ([array size component] != 3)"
8979
}
9080

9181
log_info "Test Sending Jobs To Various Components"

0 commit comments

Comments
 (0)