Skip to content

Commit

Permalink
testsuite: cover delayed shutdown
Browse files Browse the repository at this point in the history
Problem: there is no coverage for the new shutdown timer.

Add a test.
  • Loading branch information
garlick committed Feb 11, 2025
1 parent 64c3deb commit da0fe20
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions t/t0025-broker-state-machine.t
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,26 @@ test_expect_success 'cleanup gets SIGHUP after broker.cleanup-timeout expires' '
./killbroker 15 60
'

test_expect_success 'create hanging rc3 for rank > 0' '
cat <<-EOT >rc3_hang &&
#!/bin/sh
rank=\$(flux getattr rank)
test \$rank -eq 0 && exit 0
sleep 5
EOT
chmod +x rc3_hang
'

test_expect_success 'run instance with short shutdown timeout' '
flux start -s3 \
-Slog-filename=shutdown.log \
-Sbroker.rc1_path= \
-Sbroker.rc3_path="$(pwd)/rc3_hang" \
-Sbroker.shutdown-timeout=1s \
true
'
test_expect_success 'appropriate message was logged' '
grep "shutdown delayed" shutdown.log
'

test_done

0 comments on commit da0fe20

Please sign in to comment.