Skip to content

Commit 6431390

Browse files
committed
testsuite: add test for exec.max-start-delay-percent
Problem: There are no tests of the max-start-delay-percent exec config key behavior. Add a test to t2900-job-timelimits.t.
1 parent c15d8b5 commit 6431390

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

t/t2900-job-timelimits.t

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,22 @@ test_expect_success 'expired job can also be canceled' '
9393
expired_cancel_test $(perl -E "say $TIMEOUT*$scale") && break
9494
done
9595
'
96+
test_expect_success 'expiration can be extended via max-start-delay-percent' '
97+
flux config load <<-EOF &&
98+
[exec]
99+
max-start-delay-percent = 0
100+
EOF
101+
test_when_finished "echo | flux config load" &&
102+
flux jobtap load \
103+
${FLUX_BUILD_DIR}/t/job-manager/plugins/.libs/perilog-test.so &&
104+
test_when_finished "flux jobtap remove perilog-test.so" &&
105+
jobid=$(flux submit -t 1m sleep 120) &&
106+
flux job wait-event -Hvt 30 $jobid start &&
107+
exp=$(flux job info $jobid R | jq .execution.expiration) &&
108+
exec_exp=$(flux module stats job-exec | jq .jobs.${jobid}.expiration) &&
109+
test_debug "echo expiration=${exp} exec_expiration=${exec_exp}" &&
110+
flux module stats job-exec | jq -e ".jobs.${jobid}.expiration > $exp" &&
111+
flux cancel $jobid &&
112+
flux job wait-event -t 30 $jobid clean
113+
'
96114
test_done

0 commit comments

Comments
 (0)