Skip to content

Commit a4d5d8e

Browse files
committed
testsuite: test job-manager.stop-queues-on-restart
Problem: There are no tests that ensure the stop-queues-on-restart config key in the [job-manager] table works. Add a test to t2219-job-manager-restart.t.
1 parent 2e951df commit a4d5d8e

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

t/t2219-job-manager-restart.t

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,28 @@ test_expect_success 'verify that named queue start/stop persists across restart'
159159
grep "^batch: Scheduling is stopped: xyzzy" dump_queue_start_3.out &&
160160
grep "^SCHED" dump_queue_start_3.out
161161
'
162-
162+
test_expect_success 'verify that stop-queues-on-restart config works' '
163+
mkdir -p conf.d &&
164+
cat >conf.d/queues.toml <<-EOT &&
165+
[job-manager]
166+
stop-queues-on-restart = true
167+
[queues.debug]
168+
[queues.batch]
169+
EOT
170+
flux start --config-path=$(pwd)/conf.d \
171+
-Scontent.dump=dump_queue_stop.tar \
172+
sh -c "flux queue start --all; flux queue stop -m xxyyzz batch" &&
173+
flux start --config-path=$(pwd)/conf.d \
174+
-Scontent.restore=dump_queue_stop.tar \
175+
flux queue status -v > dump_stop.out &&
176+
test_debug "cat dump_stop.out" &&
177+
grep \
178+
"batch: Scheduling is stopped: xxyyzz" \
179+
dump_stop.out &&
180+
grep \
181+
"debug: Scheduling is stopped: Automatically stopped due to restart" \
182+
dump_stop.out
183+
'
163184
test_expect_success 'checkpointed queue no longer configured on restart is ignored' '
164185
mkdir -p conf.d &&
165186
cat >conf.d/queues.toml <<-EOT &&

0 commit comments

Comments
 (0)