@@ -126,16 +126,16 @@ test_expect_success 'flux-queue: status reports no reason for stop' '
126
126
'
127
127
128
128
test_expect_success HAVE_JQ ' flux-queue: stop with --nocheckpoint works' '
129
- flux queue start &&
130
- flux kvs get checkpoint.job-manager | jq -e ".queue[0].start == true" &&
131
- flux queue stop --nocheckpoint &&
132
- flux kvs get checkpoint.job-manager | jq -e ".queue[0].start == true" &&
133
- flux queue status >status3.out &&
134
- cat <<-EOT >status3.exp &&
135
- Job submission is enabled
136
- Scheduling is stopped
137
- EOT
138
- test_cmp status3.exp status3.out
129
+ flux start \
130
+ -o,-Scontent.dump=dump_queue_nocheckpoint1.tar \
131
+ flux queue stop &&
132
+ tar -xvf dump_queue_nocheckpoint1.tar &&
133
+ cat checkpoint/job-manager | jq -e ".queue[0].start == false" &&
134
+ flux start \
135
+ -o,-Scontent.dump=dump_queue_nocheckpoint2.tar \
136
+ flux queue stop --nocheckpoint &&
137
+ tar -xvf dump_queue_nocheckpoint2.tar &&
138
+ cat checkpoint/job-manager | jq -e ".queue[0].start == true"
139
139
'
140
140
141
141
test_expect_success ' flux-queue: submit some jobs' '
@@ -533,19 +533,34 @@ test_expect_success 'previously submitted job run to completion' '
533
533
flux jobs -n -o "{state}" $(cat job_batch2.id) | grep INACTIVE
534
534
'
535
535
536
- # for this test we pick one the first queue's name to stop, but we don't care
537
- # which one it is
538
- test_expect_success HAVE_JQ ' flux-queue: stop with one queue and --nocheckpoint works' '
539
- flux queue start --all &&
540
- flux kvs get checkpoint.job-manager | jq -e ".queue[0].start == true" &&
541
- flux kvs get checkpoint.job-manager | jq -e ".queue[1].start == true" &&
542
- flux kvs get checkpoint.job-manager | jq -r ".queue[0].name" > name.out &&
543
- flux queue stop -q $(cat name.out) --nocheckpoint nocheckpoint &&
544
- flux queue status >mqstatus_nocheckpoint.out &&
545
- test $(grep -c "Scheduling is started" mqstatus_nocheckpoint.out) -eq 1 &&
546
- test $(grep -c "Scheduling is stopped: nocheckpoint" mqstatus_nocheckpoint.out) -eq 1 &&
547
- flux kvs get checkpoint.job-manager | jq -e ".queue[0].start == true" &&
548
- flux kvs get checkpoint.job-manager | jq -e ".queue[1].start == true"
536
+ test_expect_success HAVE_JQ ' flux-queue: stop with named queues and --nocheckpoint works' '
537
+ mkdir -p conf.d &&
538
+ cat >conf.d/queues.toml <<-EOT &&
539
+ [queues.debug]
540
+ [queues.batch]
541
+ EOT
542
+ cat >stopqueues.sh <<-EOT &&
543
+ flux queue start --all
544
+ flux queue stop --all
545
+ EOT
546
+ cat >stopqueuesnocheckpoint.sh <<-EOT &&
547
+ flux queue start --all
548
+ flux queue stop --all --nocheckpoint
549
+ EOT
550
+ chmod +x ./stopqueues.sh &&
551
+ chmod +x ./stopqueuesnocheckpoint.sh &&
552
+ flux start -o,--config-path=$(pwd)/conf.d \
553
+ -o,-Scontent.dump=dump_queue_named_nocheckpoint1.tar \
554
+ ./stopqueues.sh &&
555
+ tar -xvf dump_queue_named_nocheckpoint1.tar &&
556
+ cat checkpoint/job-manager | jq -e ".queue[0].start == false" &&
557
+ cat checkpoint/job-manager | jq -e ".queue[1].start == false" &&
558
+ flux start -o,--config-path=$(pwd)/conf.d \
559
+ -o,-Scontent.dump=dump_queue_named_nocheckpoint2.tar \
560
+ ./stopqueuesnocheckpoint.sh &&
561
+ tar -xvf dump_queue_named_nocheckpoint2.tar &&
562
+ cat checkpoint/job-manager | jq -e ".queue[0].start == true" &&
563
+ cat checkpoint/job-manager | jq -e ".queue[1].start == true"
549
564
'
550
565
551
566
test_expect_success ' flux-queue: quiet option works with one queue' '
0 commit comments