Skip to content

Commit b75cbb0

Browse files
committed
testsuite: convert to use flux submit
Problem: In t2260-job-list.t, some test jobs are submitted using "flux job submit". This makes it inconvenient to set job requirements on those jobs, such as specific nodes the jobs should run on. Solution: Convert all uses of "flux job submit" to use "flux submit".
1 parent 332c349 commit b75cbb0

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

t/t2260-job-list.t

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,11 @@ test_expect_success 'create helper job submission script' '
5252
# - alternate userid job listing
5353

5454
test_expect_success 'submit jobs for job list testing' '
55-
# Create `hostname` and `sleep` jobspec
56-
# N.B. Used w/ `flux job submit` for serial job submission
57-
# for efficiency (vs serial `flux submit`.
58-
#
59-
flux submit --dry-run hostname >hostname.json &&
60-
flux submit --dry-run --time-limit=5m sleep 600 > sleeplong.json &&
6155
#
6256
# submit jobs that will complete
6357
#
6458
for i in $(seq 0 3); do
65-
flux job submit hostname.json >> inactiveids
59+
flux submit hostname >> inactiveids
6660
fj_wait_event `tail -n 1 inactiveids` clean
6761
done &&
6862
#
@@ -116,20 +110,20 @@ test_expect_success 'submit jobs for job list testing' '
116110
# Submit 8 sleep jobs to fill up resources
117111
#
118112
for i in $(seq 0 7); do
119-
flux job submit sleeplong.json >> runningids
113+
flux submit --time-limit=5m sleep 600 >> runningids
120114
done &&
121115
tac runningids | flux job id > running.ids &&
122116
#
123117
# Submit a set of jobs with misc urgencies
124118
#
125-
id1=$(flux job submit -u20 hostname.json) &&
126-
id2=$(flux job submit hostname.json) &&
127-
id3=$(flux job submit -u31 hostname.json) &&
128-
id4=$(flux job submit -u0 hostname.json) &&
129-
id5=$(flux job submit -u20 hostname.json) &&
130-
id6=$(flux job submit hostname.json) &&
131-
id7=$(flux job submit -u31 hostname.json) &&
132-
id8=$(flux job submit -u0 hostname.json) &&
119+
id1=$(flux submit --urgency=20 hostname) &&
120+
id2=$(flux submit hostname) &&
121+
id3=$(flux submit --urgency=31 hostname) &&
122+
id4=$(flux submit --urgency=0 hostname) &&
123+
id5=$(flux submit --urgency=20 hostname) &&
124+
id6=$(flux submit hostname) &&
125+
id7=$(flux submit --urgency=31 hostname) &&
126+
id8=$(flux submit --urgency=0 hostname) &&
133127
flux job id $id3 > pending.ids &&
134128
flux job id $id7 >> pending.ids &&
135129
flux job id $id1 >> pending.ids &&
@@ -2677,6 +2671,7 @@ test_expect_success 'reload job-ingest without validator' '
26772671
'
26782672

26792673
test_expect_success 'create illegal jobspec with empty command array' '
2674+
flux submit --dry-run hostname > hostname.json &&
26802675
cat hostname.json | $jq ".tasks[0].command = []" > bad_jobspec.json
26812676
'
26822677

0 commit comments

Comments
 (0)