Skip to content

Commit 68165f8

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 f1de8d0 commit 68165f8

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
@@ -53,17 +53,11 @@ test_expect_success 'create helper job submission script' '
5353
# - alternate userid job listing
5454

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

28002794
test_expect_success 'create illegal jobspec with empty command array' '
2795+
flux submit --dry-run hostname > hostname.json &&
28012796
cat hostname.json | $jq ".tasks[0].command = []" > bad_jobspec.json
28022797
'
28032798

0 commit comments

Comments
 (0)